core data: awakeFromFetch, awakeFromInsert, didTurnIntoFault
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