• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting notified of any change to a specific NSManagedObject?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Getting notified of any change to a specific NSManagedObject?
      • From: Mike Abdullah <email@hidden>
    • Re: Getting notified of any change to a specific NSManagedObject?
      • From: Kyle Sluder <email@hidden>
References: 
 >Getting notified of any change to a specific NSManagedObject? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Getting notified of any change to a specific NSManagedObject?
  • Next by Date: Bugs with parentViewController?
  • Previous by thread: Re: Getting notified of any change to a specific NSManagedObject?
  • Next by thread: Re: Getting notified of any change to a specific NSManagedObject?
  • Index(es):
    • Date
    • Thread