How to bind to a custom controller class?

2011-11-06 Thread Koen van der Drift
How do I bind a controller class to my core data model? The controller class (a subclass of NSObject) needs to access the value that is at arrangedObjects.name in an NSArrayController. The NSArrayController feeds an NSTableView, and that works fine through bindings, but I don't know how to tap into

Re: How to highlight the current line in NSTextView?

2011-11-06 Thread Nick
Keary, Douglas Could you please give me a hint what methods to search for? Basically I need an NSRange of the current line (or that part of it, whereb the cursor is in, if the line is word-wrapped). Then I'll simply change this substring's attributes. Should i find the current text cursor's positio

Re: How to highlight the current line in NSTextView?

2011-11-06 Thread Keary Suska
On Nov 6, 2011, at 8:39 AM, Nick wrote: > Keary, Douglas > Could you please give me a hint what methods to search for? > Basically I need an NSRange of the current line (or that part of it, whereb > the cursor is in, if the line is word-wrapped). Then I'll simply change this > substring's attri

Re: In Praise of ARC

2011-11-06 Thread James Merkel
On Sat, 05 Nov 2011 15:39:01 -0600 Philip McIntosh wrote: > I am impressed with the implementation of Automatic Reference Counting (ARC) > in iOS 5 and the conversion tool built into XCode 4.2. I have an app that > generated a small leak each time I ran a "cycle" of the app. This was no > doubt

Re: How to bind to a custom controller class?

2011-11-06 Thread Koen van der Drift
Ok, after a day of trying various things, I got it to work. Not sure how I got here, but I am using an NSViewController plus corresponding nib; the representedObject of the NSViewController is the NSArrayController. I also moved the NSArrayController to the AppDelegate class, so it is accessible to

Private Method?

2011-11-06 Thread Bryan Harrison
I'm a total tyro and hope nobody minds if I fire off the occasional incredibly elementary question. I'm reviewing some sample code and am looking at a class with a method declared in @implementation which isn't mentioned in any @interface. Is this a private method, something else entirely, or

Re: Private Method?

2011-11-06 Thread Graham Cox
On 07/11/2011, at 9:10 AM, Bryan Harrison wrote: > I'm reviewing some sample code and am looking at a class with a method > declared in @implementation which isn't mentioned in any @interface. > > Is this a private method, something else entirely, or merely sloppy coding? Could it be an over

Re: Private Method?

2011-11-06 Thread Joar Wingfors
On 6 nov 2011, at 23:39, Graham Cox wrote: >> If the former, how does this technique compare with the trick of putting an… >> >> @interface someClass () >> - (type) somePrivateMethod; >> @end >> >> …in the implementation? > > I could be wrong, but I'm not sure that syntax is legal. The round b

Re: Private Method?

2011-11-06 Thread Joar Wingfors
On 6 nov 2011, at 14:10, Bryan Harrison wrote: > I'm a total tyro and hope nobody minds if I fire off the occasional > incredibly elementary question. > > I'm reviewing some sample code and am looking at a class with a method > declared in @implementation which isn't mentioned in any @interf