• 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
problem observing selectionIndex of an array controller
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem observing selectionIndex of an array controller


  • Subject: problem observing selectionIndex of an array controller
  • From: Stuart Malin <email@hidden>
  • Date: Sat, 7 Mar 2009 21:52:17 -1000

I'm trying to watch for changes in the selection of a tableView managed by an NSArrayController. I set up an observer:

	[mArrayController addObserver:self
		forKeyPath:@"selectionIndex"
		options:NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew
		context:NULL];

When the -observedValueForKeyPath:... method is invoked, the change dictionary has entries for the new and old value, but they are both NSNull.

According to the NSArrayController docs, the selectionIndex is an observable property. Why might I not be getting the index values?

_______________________________________________

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


  • Follow-Ups:
    • Re: problem observing selectionIndex of an array controller
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Need to use Quartz... I think?
  • Next by Date: Re: problem observing selectionIndex of an array controller
  • Previous by thread: Re: Binding to table with variable number of columns
  • Next by thread: Re: problem observing selectionIndex of an array controller
  • Index(es):
    • Date
    • Thread