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

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


  • Follow-Ups:
    • Re: NSManagedObjectContextObjectsDidChangeNotification
      • From: Niko Matsakis <email@hidden>
  • Prev by Date: Re: NSWindow and NSImageView
  • Next by Date: making an "enabled" binding on a per-row basis in an NSTableView
  • Previous by thread: Re: __attribute__ in Objective-C
  • Next by thread: Re: NSManagedObjectContextObjectsDidChangeNotification
  • Index(es):
    • Date
    • Thread