• 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
awakeFromInsert called twice with nested contexts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

awakeFromInsert called twice with nested contexts


  • Subject: awakeFromInsert called twice with nested contexts
  • From: Tom Harrington <email@hidden>
  • Date: Wed, 16 Nov 2011 18:16:44 -0700

I'm finding that if I use nested managed object contexts,
awakeFromInsert will be called twice on new objects.

The first call to -awakeFromInsert happens when I actually create a
managed object and insert it into the child context. On this call, if
I break in awakeFromInsert, self's managed object context is the child
context. The second call happens when I tell the child context to
save-- but this time, at the awakeFromInsert breakpoint, self's MOC is
the parent context. I've verified that it's the same object by
checking the object ID.

Since awakeFromNib is documented to be called only once in the
object's lifetime, I'm wondering if this is a Core Data bug or a
documentation bug. Has anyone else seen this?



--
Tom Harrington
email@hidden
AIM: atomicbird1
_______________________________________________

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

  • Follow-Ups:
    • Re: awakeFromInsert called twice with nested contexts
      • From: Richard Somers <email@hidden>
    • Re: awakeFromInsert called twice with nested contexts
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: AXUIElementPostKeyboardEvent - not sending key presses to Safari/TextEdit in Lion
  • Next by Date: Re: Resizable borderless windows in Lion
  • Previous by thread: Re: AXUIElementPostKeyboardEvent - not sending key presses to Safari/TextEdit in Lion
  • Next by thread: Re: awakeFromInsert called twice with nested contexts
  • Index(es):
    • Date
    • Thread