WORKAROUND: observing changes in an NSArrayController's selection
WORKAROUND: observing changes in an NSArrayController's selection
- Subject: WORKAROUND: observing changes in an NSArrayController's selection
- From: Chuck Musser <email@hidden>
- Date: Sat, 31 Jul 2004 12:54:42 -0700
I ended up simply querying the array controller for the desired key
directly, like this:
[myArrayController valueForKeyPath:@"selection.myKey"];
My earlier mail was not quite correct. The following message expression
is what always returns NSNull:
[change valueForKey:NSKeyValueChangeNewKey];
Never did figure out why this is.
Chuck
Chuck Musser wrote:
When I use KVO to observe my NSArrayController's selection, my
observeValueForKeyPath: ofObject: change: context: method gets called,
but the contents of the "change" parameter are not what I expect. This
dictionary contains "kind" and "new" keys, but the value associated
with the "new" key is always NSNull.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.