Re: an oldie but a goodie: observing properties of collected objects
Re: an oldie but a goodie: observing properties of collected objects
- Subject: Re: an oldie but a goodie: observing properties of collected objects
- From: Jerry Krinock <email@hidden>
- Date: Thu, 17 Jun 2010 14:51:04 -0700
On 2010 Jun 17, at 12:21, Matt Neuburg wrote:
> My question is, does anyone have a *simple* approach to this common problem?
Not necessarily any simpler, but another technique which may be better than observing each object in some situations, (although not yours, without modification). Implement custom setters for properties you want to observe, and in them check for value changes and post notifications. Improve efficiency by coalescing. Watch for infinite loops; posting styles can be helpful.
Not a good idea with NSMutableDictionary, though. You'd need to use a custom class instead so you have some real setters.
_______________________________________________
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