Re: Strategy for acting on changes in child objects?
Re: Strategy for acting on changes in child objects?
- Subject: Re: Strategy for acting on changes in child objects?
- From: Graham Cox <email@hidden>
- Date: Thu, 7 May 2009 18:46:51 +1000
On 07/05/2009, at 6:39 PM, Caleb Strockbine wrote:
Isn't that pretty much what +keyPathsForValuesAffectingValueForKey:
is for? The parent object could observe a single property, such as
'modified', and any children would implement either
+keyPathsForValuesAffectingValueForKey: or
+keyPathsForValuesAffectingModified to return the set of the
properties that would cause a child to be treated as modified. No
utility method needed -- KVO does it for you.
I suspected it might be but frankly I found the documentation
confusing and couldn't get it to work. Also, it's 10.5 only, though
there is a deprecated older method that serves a similar purpose.
--Graham
_______________________________________________
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