• 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
NSArrayController's selectedIndexes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSArrayController's selectedIndexes


  • Subject: NSArrayController's selectedIndexes
  • From: Ryan Brown <email@hidden>
  • Date: Sat, 9 Aug 2008 00:24:00 -0700

When I observe an NSArrayController's selectedIndexes key like so:

- (void)awakeFromNib {
[arrayController addObserver:self forKeyPath:@"selectionIndexes" options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld) context:nil];
}


- (void)observeValueForKeyPath:(NSString *)keyPath
                      ofObject:(id)object
                        change:(NSDictionary *)change
                       context:(void *)context {
	NSLog(@"change: %@", change);
}

I'm never seeing the old and new indexes. I always see output like:

2008-08-09 00:14:04.513 test[12498:10b] change: {
    kind = 1;
    new = <null>;
    old = <null>;
}

[arrayController selectedIndexes] gives the correct new value. A table view is bound to the array controller in a typical configuration (selectedIndexes is bound to the array controller).

Any ideas?

Ryan
_______________________________________________

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: NSArrayController's selectedIndexes
      • From: Ryan Brown <email@hidden>
  • Prev by Date: Re: Dragging broken symlinks
  • Next by Date: Re: NSArrayController's selectedIndexes
  • Previous by thread: Re: Dragging broken symlinks
  • Next by thread: Re: NSArrayController's selectedIndexes
  • Index(es):
    • Date
    • Thread