Re: noob question regarding proxy object returned by -selection method of NSArrayController

2008-06-29 Thread Ken Thomases
On Jun 28, 2008, at 12:43 PM, Stuart Malin wrote: I have a button in the GUI that should cause various changes to the person selected in the table. In the method that is the target of the button's action, I need to get the selected Person object so I can operate on it. I know I could use

Re: noob question regarding proxy object returned by -selection method of NSArrayController

2008-06-29 Thread Stuart Malin
On Jun 29, 2008, at 12:07 AM, Ken Thomases wrote: On Jun 28, 2008, at 12:43 PM, Stuart Malin wrote: I have a button in the GUI that should cause various changes to the person selected in the table. In the method that is the target of the button's action, I need to get the selected Person

Re: noob question regarding proxy object returned by -selection method of NSArrayController

2008-06-29 Thread Ken Thomases
On Jun 29, 2008, at 10:47 AM, Stuart Malin wrote: On Jun 28, 2008, at 11:14 AM, Owen Yamauchi wrote: How about [[controller selection] valueForKey:@self]? NSObject has a -self method which just returns the receiver, and since the proxy object must respond to the KVC query as if it were the

noob question regarding proxy object returned by -selection method of NSArrayController

2008-06-28 Thread Stuart Malin
Still pursuing my understanding of bindings: I have a table view whose columns are bound to an NSArrayController, which in turn has its contentObject that is a mutable array of Person objects. Person objects have KVC-conforming properties, which provide the values for the data in the

Re: noob question regarding proxy object returned by -selection method of NSArrayController

2008-06-28 Thread Keary Suska
6/28/08 11:43 AM, also sprach [EMAIL PROTECTED]: If I do this (have the update logic in the Person class), then I can't use the proxy object returned by the -selection method of the NSController (because the proxy object doesn't respond to the methods of the backing class). My question

[SOLVED] noob question regarding proxy object returned by -selection method of NSArrayController

2008-06-28 Thread Stuart Malin
Sorry for the post how did I miss -selectedObjects Begin forwarded message: From: Stuart Malin [EMAIL PROTECTED] Date: June 28, 2008 10:43:36 AM PDT To: Cocoa Developer List cocoa-dev@lists.apple.com Subject: noob question regarding proxy object returned by -selection method

Re: [SOLVED] noob question regarding proxy object returned by -selection method of NSArrayController

2008-06-28 Thread Owen Yamauchi
How about [[controller selection] valueForKey:@self]? NSObject has a -self method which just returns the receiver, and since the proxy object must respond to the KVC query as if it were the underlying object, you get the underlying object back. Owen ___