Re: NSManagedObjectContextObjectsDidChangeNotification
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