• 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: CoreData - re-faulting object and removing self-observers results in messages being sent to zombie
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData - re-faulting object and removing self-observers results in messages being sent to zombie


  • Subject: Re: CoreData - re-faulting object and removing self-observers results in messages being sent to zombie
  • From: Frank Illenberger <email@hidden>
  • Date: Thu, 4 Aug 2005 21:29:00 +0200



didChangeValueForKey is called for magicAttribute even though there are no observers (or UI objects bound to that key.)




The managed object context always registers itself as an observer of any managed objects that have been inserted or fetched into it; this is how it does faulting, change tracking and relationship management, and why your accessor methods always need to invoke will/didAccessValueForKey and will/didChangeValueForKey.

Thus, managed objects will always post will/didChangeValueForKey notifications. (Unless you passed nil to the factory or initializer method for the managed object context parameter, but you're good programmers and don't do that kind of thing, right?)

+Melissa


I meant the case for dependent attributes - the ones that have been setup via setKeys:triggerChangeNotificationsForDependentKey: For them, will/didChangeValueForKey is never called.
So the will/did methods are not a good place to hook in, if you want to set up a dependency graph among derived attributes.


Frank

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: CoreData - re-faulting object and removing self-observers results in messages being sent to zombie (From: Frank Illenberger <email@hidden>)
 >Re: CoreData - re-faulting object and removing self-observers results in messages being sent to zombie (From: Jim Correia <email@hidden>)
 >Re: CoreData - re-faulting object and removing self-observers results in messages being sent to zombie (From: Melissa Turner <email@hidden>)

  • Prev by Date: Re: CoreData - re-faulting object and removing self-observers results in messages being sent to zombie
  • Next by Date: Re: includeing path of files.h on mac in my program
  • Previous by thread: Re: CoreData - re-faulting object and removing self-observers results in messages being sent to zombie
  • Next by thread: core data document undo problem
  • Index(es):
    • Date
    • Thread