• 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: NSManagedObjectContextObjectsDidChangeNotification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSManagedObjectContextObjectsDidChangeNotification


  • Subject: Re: NSManagedObjectContextObjectsDidChangeNotification
  • From: Jim Correia <email@hidden>
  • Date: Fri, 14 Nov 2008 21:25:54 -0500

On Nov 14, 2008, at 8:37 PM, Jerry Krinock wrote:

NSManagedObjectContextObjectsDidChangeNotification gives me a userInfo dictionary that segregates changes into the type of change: inserted, updated, deleted.

Well, in my app, and it seems that in any real-life app, the more important segregation, and the dependency in the first branching of my code, is the object class or entity, not the type of change.

For example, if there has been any type of change to an Employee, I need to do something completely different than if there is any type of change to a Fruit.

So, in my handler method for NSManagedObjectContextObjectsDidChangeNotification, I must first enumerate through the userInfo dictionaries and make a new dictionary where the keys are object class or entity instead.

Am I doing something wrong?

That's hard to answer without knowing a bit more about what it is you are doing in response to the notification.


(For example, it might be that there is a more appropriate solution to the problem you are trying to solve.)

Jim

_______________________________________________

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: NSManagedObjectContextObjectsDidChangeNotification
      • From: Jerry Krinock <email@hidden>
References: 
 >NSManagedObjectContextObjectsDidChangeNotification (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Calling a script with parameters failing with error -1708
  • Next by Date: Re: NSDistantObject in Core Data
  • Previous by thread: NSManagedObjectContextObjectsDidChangeNotification
  • Next by thread: Re: NSManagedObjectContextObjectsDidChangeNotification
  • Index(es):
    • Date
    • Thread