NSManagedObjectContextObjectsDidChangeNotification
NSManagedObjectContextObjectsDidChangeNotification
- Subject: NSManagedObjectContextObjectsDidChangeNotification
- From: Niko Matsakis <email@hidden>
- Date: Fri, 21 Oct 2005 14:27:05 +0200
I have setup a class which listens for
NSManagedObjectContextObjectsDidChangeNotification and makes changes
to the objects in question to keep them in sync. It is for a
flashcard application, and the idea is that when the text of a word
changes (for example), I can keep up to date a list of which articles
the word is associated with, etc. It seemed more appropriate to
listen for this notification than to use key value observing because
I am interested in changes to any Word object, not a specific one.
Now this actually seems to work quite well, but it got me wondering:
How often is a NSManagedObjectContextObjectsDidChangeNotification
sent? It doesn't seem to be sent immediately when changes are made,
but rather collects changes. I am guessing that it is collects all
changes made during an undo transaction or something like that? I
see some vague references in the documentation to "transactions" in
reference to deleted objects, but that's all I could find.
I am curious because the wrong answer could send my code into an
infinite recursion loop, and I want to know if I have to worry about
this.
The other question, I suppose, is whether this design raises any red
flags for those more experienced with Cocoa / Core Bindings than I.
Niko
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden