• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Listening for changes in a table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Listening for changes in a table (From: Chris Idou <email@hidden>)

  • Prev by Date: Re: Listening for changes in a table
  • Next by Date: Re: Differences between -isEqual: and -isEqualTo:?
  • Previous by thread: Re: Listening for changes in a table
  • Next by thread: How to get AirPort Connection Status
  • Index(es):
    • Date
    • Thread