On 2014 Mar 31, at 02:29, Dado Colussi <dado.colu...@gmail.com> wrote:

> I don't start observers in -awakeFromInsert or -awakeFromFetch. I start them 
> on demand, and in -awakeFromSnapshotEvents: with NSSnapshotEventUndoDeletion 
> (I ignore the other flags). I think the best place to start observers depends 
> on how the objects are used.

Dado, the “question” in my previous message was not posed to you personally, 
just posing a situation that anyone might be in.  I’m sorry for the confusion.

Anyhow, it looks as though, contrary to documentation, -awakeFromInsert can be 
re-run on an object during -[NSManagedObjectContext rollback].  There are some 
instances where such a second run for -awakeFromInsert would cause unexpected 
results.  However, maybe this is not a concern because, at least in my apps I 
never explicitly invoke -[NSManagedObjectContext rollback].  Does anyone know 
of a situation in which Cocoa would invoke -[NSManagedObjectContext rollback] 
internally?


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to