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

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


  • Subject: Re: Triggering change notifications when modifying custom object ivars in core data app
  • From: Keary Suska <email@hidden>
  • Date: Thu, 28 May 2009 08:39:01 -0600

On May 28, 2009, at 7:03 AM, Rick Hoge wrote:


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.


http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdNSAttributes.html#/ /apple_ref/doc/uid/TP40001919

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

_______________________________________________

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: Rick Hoge <email@hidden>
References: 
 >Triggering change notifications when modifying custom object ivars in core data app (From: Rick Hoge <email@hidden>)

  • Prev by Date: Find default application for file of particular extension
  • Next by Date: Regarding SavePanel in NSDocument
  • Previous by thread: Triggering change notifications when modifying custom object ivars in core data app
  • Next by thread: Re: Triggering change notifications when modifying custom object ivars in core data app
  • Index(es):
    • Date
    • Thread