• 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
Triggering change notifications when modifying custom object ivars in core data app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Triggering change notifications when modifying custom object ivars in core data app


  • Subject: Triggering change notifications when modifying custom object ivars in core data app
  • From: Rick Hoge <email@hidden>
  • Date: Thu, 28 May 2009 09:03:54 -0400


I have a core data (doc-based) app in which one of the entities includes a custom object as a persistent attribute. The custom object class implements NSCoding, and these objects are saved to the core data store with no problem (they are read back correctly etc). Instance variables of the custom object are exposed in the user interface, and can be edited by the user.


The problem I have is that changes to instance variables of these custom objects are not reported to the managed object context, so the core data document is not flagged as dirty and, even if I force a save by adding an entity and invoking save, the modified custom object is not saved (if I quit and reload the old ivar values are loaded).

None of this is terribly surprising, since I'm going outside the core data world with these custom objects. However I expect there must be a way to tell the managed object context it's dirty when a custom object attribute has been modified. I've been reviewing the documentation, but it's not obvious what the preferred/cleanest way would be...

I would be most grateful for any suggestions on how to approach this.

Regards,

Rick

_______________________________________________

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: Triggering change notifications when modifying custom object ivars in core data app
      • From: Quincey Morris <email@hidden>
    • Re: Triggering change notifications when modifying custom object ivars in core data app
      • From: Keary Suska <email@hidden>
  • Prev by Date: Send Keyboard Events
  • Next by Date: sending continues NSImage data to iPhone
  • Previous by thread: Re: Send Keyboard Events
  • Next by thread: Re: Triggering change notifications when modifying custom object ivars in core data app
  • Index(es):
    • Date
    • Thread