Re: Keys dependent on NSArrayController's selection
Re: Keys dependent on NSArrayController's selection
- Subject: Re: Keys dependent on NSArrayController's selection
- From: "Sean McBride" <email@hidden>
- Date: Thu, 8 May 2008 10:22:56 -0400
- Organization: Rogue Research
On 5/8/08 1:53 AM, Dave Dribin said:
>> The docs for keyPathsForValuesAffectingValueForKey say
>> keyPaths are ok, but mmalc has mentioned on this list "provided that
>> the
>> path doesn't include to-many relationships". This appears to be
>> true in
>> your case, so probably explains it. The docs don't mention this
>> caveat. :(
>
>I don't believe this falls under the to-many case. That would be
>doing something like observing "arrangedObjects.firstName" to watch
>when any first name in the array changes. That is not supported. You
>have to observer every object in the array.
Ah yes, quite right.
>For kicks, I did try
>"peopleController.selectionIndex" as well as
>"peopleController.selectedObjects" to no avail.
So it seems you have observed the same as I: that
keyPathsForValuesAffectingValueForKey does not seem to work with key
paths, despite the docs saying it should.
>> Also, I seem to remember reading that doing willChange/didChange
>> back-to-
>> back without actually changing anything is a no-no. You might check
>> the
>> archives to confirm my shoddy memory.
>
>Unfortunately, my search foo must be weak. Searching on {will/
>did}ChangeValueForKey turns up way to many hits.
This is what I was remembering:
<http://www.cocoabuilder.com/archive/message/cocoa/2006/6/4/164955>
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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