Re: Custom Cell Bindings
Re: Custom Cell Bindings
- Subject: Re: Custom Cell Bindings
- From: Seth Willits <email@hidden>
- Date: Sat, 03 Sep 2011 23:35:27 -0700
On Sep 3, 2011, at 10:43 PM, Ken Thomases wrote:
> On Sep 3, 2011, at 10:20 PM, Seth Willits wrote:
>
>> Hence, my thinking is since it doesn't work right out of the box as I'd expect, then perhaps there's some undocumented thing I'm supposed to be doing in my NSActionCell subclass which is half of the implementation. As in, perhaps my cell subclass is supposed to do X so the table view can correctly do Y to propagate the value. That's what I'm asking.
>
> I believe that invoking -sendAction:to: on the table view is the X you're looking for.
It's not. sendAction:to: is always called from the mouse tracking for instance, even when the cell's target and action are both nil, but the table view still doesn't do any propagation of the value.
In the case of the checkbox, sendAction:to: is called by the cell on the table view, which falls to NSControl's implementation. NSControl's implementation calls the -[_NSBindingAdaptor objectDidTriggerAction:] method.
That appears to _only_ happen when the cell is of certain types.
This is one of those times where I really wish Cocoa was open source. It'd take 5 minutes to find an answer to this.
> Have you verified that -sendAction:to: is being invoked on the table view by your cell's mouse tracking and other event handling -- basically, anything which updates its value? Have you checked when, if ever, the table view is querying your cell's objectValue? Are you sure that your cell is reporting its new objectValue prior to calling -sendAction:to:?
Absolutely certain of everything.
--
Seth Willits
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden