On Sep 18, 2008, at 7:43 PM, Chris Idou wrote:

Well I do have the checkbox bound to the controller. It is bound to one of the attributes in the array of mutable dictionaries contained within my NSArrayController.

But I don't see how this lets me get control to do something when someone clicks the checkbox.

Two possibilities:

* If you used a custom class rather than a dictionary, then there would be a setter of your own design called when the property is set due to a change in the checkbox. You could put code into that setter to do... whatever.

* Your controller can use KVO to observe the property to which the checkbox is bound. Then it will receive change notifications when the property is changed.


Yes I can put an action on the ButtonCell, but this doesn't tell me which record in the array the clicked cell relates to.

If you use bindings to set the target of the cell, and you use a custom class with an action method rather than a dictionary, you could have the cell deliver an action directly to the model object.

Cheers,
Ken

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to