• 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
Key value observing NSManagedObjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Key value observing NSManagedObjects


  • Subject: Key value observing NSManagedObjects
  • From: Martin <email@hidden>
  • Date: Thu, 21 Feb 2008 20:49:58 +0100

Hi,

I'd like to key-value observe a property of an NSManagedObject. I tried to register an observer (in the init: method of my app's controller) using "addObserver:forKeyPath:options:" but it doesn't work because the observation is lost as my object gets dealloc'ed soon after I register as an observer. This is specified in the Core Data documentation : "Core Data "owns" the life-cycle of managed objects. [...] managed objects can be instantiated, destroyed, and resurrected by the framework as it requires."

So how can I observe a Core Data object property and how can the observation survive the multiple instantiations/desctructions of the NSManagedObject?

Thanks,
-Martin.
_______________________________________________

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


  • Prev by Date: Re: initWithFrame not being called on my NSImageView subclass
  • Next by Date: quirky default button coloring
  • Previous by thread: Re: -outlineView:heightOfRowByItem: gets an item of NULL??
  • Next by thread: re: Key value observing NSManagedObjects
  • Index(es):
    • Date
    • Thread