• 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: Observing change of selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Observing change of selection


  • Subject: Re: Observing change of selection
  • From: mmalcolm crawford <email@hidden>
  • Date: Thu, 27 Jan 2005 17:48:20 -0800


On Jan 27, 2005, at 3:36 PM, Guy English wrote:

The simplest way is to just be 'old-fashioned' about it. Make your
Controller object a delegate of the table view in question and
implement the (void)tableViewSelectionDidChange method. Just because
you're using bindings doesn't mean that the table view won't talk to
it's delegate anymore.

Indeed; one additional thing to remember, though, is that you should then probably ask the array controller for its selection. If your table view supports sorting or your array controller supports filtering, then asking your original array for the object at the index of the table view's selection won't give you the correct answer...


If you want to stay with the bindings paradigm, on alternative is to observe the array controller's selectedObjects. Using tableViewSelectionDidChange: may be easier...

mmalc


_______________________________________________ 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
References: 
 >Observing change of selection (From: Bob Peterson <email@hidden>)
 >Re: Observing change of selection (From: Guy English <email@hidden>)

  • Prev by Date: Re: ScreenSaverView with multiple displays
  • Next by Date: [Moderator] Cocoa and list resources
  • Previous by thread: Re: Observing change of selection
  • Next by thread: (newbie): how to create a 2nd document type
  • Index(es):
    • Date
    • Thread