Detecting text under mouse

2009-06-12 Thread Jacob Rhoden
useful on Microsoft Windows for learning chinese: http://www.mdbg.net/chindict/chindict.php?page=chinese_dictionary_windows Best regards, Jacob -- Jacob Rhoden http://jacobrhoden.com ___ Cocoa

Re: Detecting text under mouse

2009-06-13 Thread Jacob Rhoden
That is exactly what I am looking for, a "Dictionary" application is essentially assisting you with being able to read information on the screen. Unfortunately I cannot find any documentation at all on how to access a programs accessable information! The only information I can find are pages an

Display either date part or time part in LOCAL format

2009-07-05 Thread Jacob Rhoden
e stringFromDate:now]; -- ________ Jacob Rhoden http://jacobrhoden.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)l

CLLocationDistance contents?

2008-12-18 Thread Jacob Rhoden
Hi Guys, I am doing the following to find a distance between two locations: CLLocation* venueLocation = [[CLLocation alloc] initWithLatitude: venue.latitude longitude:venue.longditude]; CLLocationDistance distance = [venueLocation getDistanceFrom:currentLocation]; Is distance in metres/miles/

Re: CLLocationDistance contents?

2008-12-18 Thread Jacob Rhoden
CLLocation* venueLocation = [[CLLocation alloc] initWithLatitude: venue.latitude longitude:venue.longditude]; CLLocationDistance distance = [venueLocation getDistanceFrom:currentLocation]; Is distance in metres/miles/km? How do I display it on screen in a platform independent way? On 19/12/

Sorting an NSMutableArray

2008-12-20 Thread Jacob Rhoden
How do you sort an NSMutableArray, when the difference between the two objects is determined by information not contained completely within the objects themselves. ie in Java you can implement a Comparator that takes two objects to compare then. Is this similar in Cocoa? ie in this case I need

Making an object release itself?

2008-12-30 Thread Jacob Rhoden
Im still learning cocoa, so I have a question about if this is a good idea or a crazy noob mistake. Given the following code can I alter it so that postreader auto releases itself? -(IBAction) fetchThreads:(id) sender { [progress startAnimation:nil]; PostReader* reader = [[PostReader al

Re: Odd EXEC_BAD_ACCESS after executing URLRequest

2008-12-30 Thread Jacob Rhoden
On 31/12/08 3:10 AM, marc hoffman wrote: i'm hoping someone has an idea here - i'm seeing odd crashes after doing URL requests. the first request completes fine (up to it triggering connectionDidFinishLoading:), but shortly after or while doing a subsequent request... Are you sure you are no

Stumped on memory problem :(

2009-01-05 Thread Jacob Rhoden
I have read the memory management documentation over and over but still cannot work out the problem with this code, can anyone see it? I have spent hours on this! +(NSMutableArray*)getStrings { NSMutableDictionary* dict = [[NSMutableDictionary alloc] init]; [dict setValue: @"" forKey: [

NKE Kernel extension

2009-01-09 Thread Jacob Rhoden
Hi, Anyone here ever done any Network kernel extensions? I am trying to start by doing something simple as monitoring network traffic, but the apple documentation isn't getting me very far? Anyone know any useful websites or tutorials in this area? Best regards, Jacob ___

Re: NKE Kernel extension

2009-01-10 Thread Jacob Rhoden
Thanks, I hadn't thought to check some other lists, ill check out what there is. On 10/1/09 11:39 PM, Alastair Houghton wrote: On 10 Jan 2009, at 07:01, Jacob Rhoden wrote: Anyone here ever done any Network kernel extensions? I am trying to start by doing something simple as monit

Re: Mac Pro memory sizes

2009-01-11 Thread Jacob Rhoden
Depending on what sort of data you has, you could try allocating all of your memory on startup, organised into related "zones". That way you are not constantly allocating/deallocating anything. Just overwriting values. This can provide an unbelievable speed inprovement, and low memory overheads

Re: [NOOB] Finding Information

2009-01-18 Thread Jacob Rhoden
On 19/01/2009 9:47 AM, Stuart Malin wrote: You can't find an answer - have you had a look at the documentation? It's right there. http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDecimalNumber_Class/Reference/Reference.html Sometimes to the newbie it may seem ast

Re: Read lines from very large text file

2009-02-02 Thread Jacob Rhoden
7 AM, Alexander Spohr wrote: NSInputStream? Am 02.02.2009 um 14:42 schrieb Jacob Rhoden: I am wondering what the best way to read a text file, line by line, when the file size is much larger than available memory. I know there are helper functions like stringWithContentsOfFile:encoding:error:, but

Read lines from very large text file

2009-02-02 Thread Jacob Rhoden
been of much extra help here. Thanks! Jacob Jacob Rhoden http://jacobrhoden.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: Read lines from very large text file

2009-02-02 Thread Jacob Rhoden
On 3/02/2009 8:41 AM, Kenneth Bruno II wrote: I am wondering what the best way to read a text file, line by line, when the file size is much larger than available memory. For very large files you probably want to use NSFileHandle. With the method readDataOfLength: you can read the file in chunk

Re: Read lines from very large text file

2009-02-03 Thread Jacob Rhoden
line ending is irrelevant, see a \n or a \r and we know we have reached the end of a "entry" in the log. Thanks, Jacob -- ________ Jacob Rhoden http://jacobrhoden.com ___ Cocoa-dev mailing list (Co

How to handle clicks on NSOutlineView

2009-02-13 Thread Jacob Rhoden
)awakeFromNib { [outline setAction:@selector(loadMemberList:)]; } -(IBAction)loadMemberList:(id)sender { if(ldap.connected) { NSLog(@"Load members"); NSLog(@" site %@ ",[[outline selectedCell] name]); } } Thanks, Jacob -- __

Re: How to handle clicks on NSOutlineView

2009-02-13 Thread Jacob Rhoden
On 14/2/09 3:39 PM, Graham Cox wrote: On 14 Feb 2009, at 12:22 pm, Jacob Rhoden wrote: I am trying to do an action when an item in an NSOutlineView is clicked. How do I work out which item was actually clicked on? Ive tried all sorts of things and nothing seems to work. (Google or Cocoa

Where to declare/initialise an NSOperationQueue

2009-02-13 Thread Jacob Rhoden
share" the same resources? I guess I am looking for direction on how best to use it. @interface WebsitesController : NSObject { NSOperationQueue *operationQueue; } Thanks, Jacob ________ Jacob Rhoden http://

Beginner memory management question

2008-12-03 Thread Jacob Rhoden
I am not sure how one would go about working this, Im writing my first "test" os/x applications and I am thinking this is probably not right. Am I doing the retain in the correct place? I tried reading the documentation on NSTextField but it didnt give me a clue about if I needed to "retain". (

Correct location to store application data.

2008-12-03 Thread Jacob Rhoden
I have an application which contains a "dictionary" file of sorts. Users can add/alter/and remove entries from a dictionary. I assume I will have the default dictionary stored as part of the application bundle somehow, and I should be saving a copy of some sort in a second hidden location, ie i

Date parsing problem (when running on iphone only)

2009-03-04 Thread Jacob Rhoden
he simulator: 2009-03-04 22:09:05.095 Test[68041:20b] DATE: Monday 26 January 2009 3:47:33 pm + to 5432224 Im completely stuck on this one! Are are there any other easy ways to parse dates? Any help appreciated. Thanks, Jacob ________ Jacob Rhoden

Re: Date parsing problem (when running on iphone only)

2009-03-04 Thread Jacob Rhoden
On 4/3/09 10:15 PM, Jacob Rhoden wrote: Anyone experience this weird behaviour with date parsing? Given the following code, it produces a different log output when running in the simulator or on the iPhone!!! NSString* test = @"Monday 26 January 2009 3:47:33 pm +"; NSDat

Re: Date parsing problem (when running on iphone only)

2009-03-04 Thread Jacob Rhoden
am used to Java's date parsing being language agnostic) Best regards, Jacob -- Jacob Rhoden http://jacobrhoden.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post a

Re: Newbie: Learning path for my GTD app...

2009-03-04 Thread Jacob Rhoden
.2 in OS X Leopard. My current plan of attack is working through these books: Learn C on the Mac C All in One Desktop Reference for Dummies Learn Objective-C On the Mac Cocoa Programming for Mac OS X 3rd edition by Aaron Hillegass -- Jacob R

Understanding how to display a context menu

2009-03-10 Thread Jacob Rhoden
Hey guys, I'm trying to understand the Apple docs for adding a context menu to an NSOutlineView: http://developer.apple.com/documentation/Cocoa/Conceptual/MenuList/Articles/DisplayContextMenu.html#//apple_ref/doc/uid/TP40004968 I am a bit stuck at how do you make it truly context sensitive, ie