Re: Why doesn't -[NSArrayController selection] et al fire keyPathsForValuesAffectingKey?
Re: Why doesn't -[NSArrayController selection] et al fire keyPathsForValuesAffectingKey?
- Subject: Re: Why doesn't -[NSArrayController selection] et al fire keyPathsForValuesAffectingKey?
- From: Kyle Sluder <email@hidden>
- Date: Fri, 2 Apr 2010 21:40:54 -0700
On Fri, Apr 2, 2010 at 8:25 PM, Jerry Krinock <email@hidden> wrote:
> But I never could get it to work. By logging, I determined the problem: None of these five observers are firing the -selectedFoo getter when the array and table controller's selection changes. When I added, as a test, some other object's key path to keyPathsForValuesAffectingKey, and changed its value, the -selectedAgent method was invoked and updated the enabled state of my button as desired. So the problem seems to be that "observeable using key-value observing" doesn't mean what I think it means. Where am I going wrong?
Because +keyPathsForValuesAffectingValueForKey relies on
NSKeyValueObservingOptionPrior, which NSArrayController doesn't
support.
File a bug. It'll get dup'ed, but do it anyway.
--Kyle Sluder
_______________________________________________
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