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: Clark Cox <email@hidden>
- Date: Thu, 16 Jun 2005 17:11:16 -0400
On 6/16/05, Clark Cox <email@hidden> wrote:
> On 6/16/05, mmalcolm crawford <email@hidden> wrote:
> >
> > On Jun 16, 2005, at 1:14 PM, Clark Cox wrote:
> >
> > > Currently, in IB, I have the binding on the table column set like so:
> > > "target" is bound to <the NSArrayController>.selection, with a
> > > selector of "selectFilename:"
> > > "argument" is also bound to <the NSArrayController>.selection.
> > > However, clicking any of the buttons in this column does nothing.
> >
> > 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. The *only*
difference between the case that works, and the case that doesn't is
that the button cell that doesn't work is inside an NSTableView, and
the one that does is in an NSButton.
--
Clark S. Cox III
email@hidden
http://www.livejournal.com/users/clarkcox3/
http://homepage.mac.com/clarkcox3/
_______________________________________________
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