• 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
Re: -awakeFromInsert can run > once. (Was: Removing object as observer…)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -awakeFromInsert can run > once. (Was: Removing object as observer…)


  • Subject: Re: -awakeFromInsert can run > once. (Was: Removing object as observer…)
  • From: Jerry Krinock <email@hidden>
  • Date: Mon, 31 Mar 2014 08:14:14 -0700

On 2014 Mar 31, at 02:29, Dado Colussi <email@hidden> 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 (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


References: 
 >Removing object as observer in -willTurnIntoFault (From: Jerry Krinock <email@hidden>)
 >Re: Removing object as observer in -willTurnIntoFault (From: Dado Colussi <email@hidden>)
 >Re: Removing object as observer in -willTurnIntoFault (From: Jerry Krinock <email@hidden>)
 >Re: Removing object as observer in -willTurnIntoFault (From: Dado Colussi <email@hidden>)

  • Prev by Date: Core animation layers work on 10.7 but not 10.8 or 10.9
  • Next by Date: Re: Core animation layers work on 10.7 but not 10.8 or 10.9
  • Previous by thread: Re: Removing object as observer in -willTurnIntoFault
  • Next by thread: Re: Removing object as observer in -willTurnIntoFault
  • Index(es):
    • Date
    • Thread