• 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
core data: awakeFromFetch, awakeFromInsert, didTurnIntoFault
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

core data: awakeFromFetch, awakeFromInsert, didTurnIntoFault


  • Subject: core data: awakeFromFetch, awakeFromInsert, didTurnIntoFault
  • From: "email@hidden" <email@hidden>
  • Date: Mon, 2 Jun 2008 08:34:02 -0700

in a couple of my classes subclassed from NSManagedObject, i provide the methods: awakeFromFetch, awakeFromInsert, & didTurnIntoFault. in the awake messages, after calling the appropriate super methods, i establish some observers like:

	[[NSNotificationCenter defaultCenter] addObserver: self ...];

and in the didTurnIntoFault method, i remove myself as an observer. i just noticed that if i create a new one of these entities and then undo it, the sequence of events is as expected:
awakeFromInsert
didTurnIntoFault
however, if i then redo the action, neither awakeFromFetch nor awakeFromInsert is called, and thus i'm left without my observing in place.


should i be handling this some other way? if so, how? (pointers to documentation would be sufficient). if this is the proper approach, how do i re-establish my observing?

th;anx,
ken
_______________________________________________

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


  • Prev by Date: Re: How does NSWorkspace -isFilePackageAtPath: work?
  • Next by Date: Leopard (10.5+): Any Upper-Level (Cocoa) access to Mail?
  • Previous by thread: Re: How does NSWorkspace -isFilePackageAtPath: work?
  • Next by thread: Re: core data: awakeFromFetch, awakeFromInsert, didTurnIntoFault
  • Index(es):
    • Date
    • Thread