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: Seth Willits <email@hidden>
- Date: Wed, 6 May 2009 22:48:37 -0700
On May 6, 2009, at 10:36 PM, Seth Willits wrote:
Which is why I said one method was to override setValue:forKey: in
the child to trigger a single observable key (isModified). But I
still don't like the solution much.
And actually now that I think about it, in a different project I even
overrided setValue:forKeyPath: in the *parent* since all of the
bindings to the child passed through the parent. I just peeked at the
keyPath to see if it started with the key for the child and then
performed the action there. That works too, but only if you always do
[parent setValue:v forKeyPath:@"child.xyz"] which is obviously fragile
and bad form.
--
Seth Willits
_______________________________________________
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