Re: Listening for changes in a table
Re: Listening for changes in a table
- Subject: Re: Listening for changes in a table
- From: "I. Savant" <email@hidden>
- Date: Thu, 18 Sep 2008 20:57:52 -0400
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.
Why does everybody forget about / ignore <NSTableDataSource>?
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSTableDataSource_Protocol/Reference/Reference.html
Bindings works fine with <NSTableDataSource>, so mix the two. As
the table's data source, you can receive
tableView:setObjectValue:forTableColumn:row: and use 'row' to ask the
array controller for the object at the arranged index, let the array
controller handle setting the value based on a view's action and do
anything else you please in response.
Of course this doesn't help you to respond to a change in the
checkbox's state prompted by a change in your model ([someObject
setFoo:YES]) but I assume you mean to respond to the user's actions.
--
I.S.
_______________________________________________
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