Re: Getting notified of any change to a specific NSManagedObject?
Re: Getting notified of any change to a specific NSManagedObject?
- Subject: Re: Getting notified of any change to a specific NSManagedObject?
- From: Rick Mann <email@hidden>
- Date: Fri, 16 Nov 2012 14:00:34 -0800
On Nov 16, 2012, at 2:31 , Mike Abdullah <email@hidden> wrote:
> Why are you trying to avoid "a bunch of" these calls? Is it just to save yourself typing?
Typing, and code maintenance. I generally have UI that displays all (or some subset of) the properties of one of my entities. I'd like that UI to update if anything updates one of the models. But if there are a dozen properties, then that's a dozen -addObserver and -removeObserver calls, in each place where there might be UI associated with it. If I later add a new property to the entity, I have to be sure to KVO, it, too. If I remove a bit of the UI, I have to remember to remove the call (not strictly, but I like keeping my code clean).
Being able to subscribe once for all changes to a single object makes these problems go away.
--
Rick
_______________________________________________
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