Re: Binding Target of NSButtonCells inside of an NSTableView
Re: Binding Target of NSButtonCells inside of an NSTableView
- Subject: Re: Binding Target of NSButtonCells inside of an NSTableView
- From: mmalcolm crawford <email@hidden>
- Date: Thu, 16 Jun 2005 20:12:15 -0700
On Jun 16, 2005, at 2:11 PM, Clark Cox wrote:
On 6/16/05, Clark Cox <email@hidden> wrote:
On 6/16/05, mmalcolm crawford <email@hidden> wrote:
This won't work.
'selection' is a proxy object that only responds to methods in
NSKeyValueCoding:
<http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/ObjC_classic/Classes/NSObjectController.html#//
apple_ref/doc/uid/20002044-BBCIDIEB>
Then, shouldn't I be getting some kind of error/message/exception
that
"so-and-so does not respond to such-and-such"?
Sorry to reply to myself, but if I plop an NSButton into the same
window in IB, and set up its bindings *identically* to those I
described above (i.e. bound to <the NSArrayController>.selection), I
can click on that button, and my method *does* get called. So the
above comment about binding to selection isn't accurate.
My apologies. [[arrayController selection] selectFilename:...] won't
work.
I can't offhand though think of a way the binding will work. You can
of course use standard target-action for the button, and then
retrieve the selection (well, selectedObjects if you want to send the
objects messages...).
mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden