• 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: subclasses of NSPersistentDocument and NSManagedObjectContext, and undo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: subclasses of NSPersistentDocument and NSManagedObjectContext, and undo


  • Subject: Re: subclasses of NSPersistentDocument and NSManagedObjectContext, and undo
  • From: mmalcolm crawford <email@hidden>
  • Date: Wed, 25 May 2005 13:09:54 -0700


On May 25, 2005, at 12:00 PM, Don Briggs wrote:

I, too, need a subclass of NSPersistentDocument to use a subclass of NSManagedObjectContext.
I followed mmalc's code below, and it works for me -- with just one glitch.
The documents act, save and open as expected.
I can add and remove contained objects, and edit them.
The undo commands work fine.
But, but ... the documents just never get dirty, no matter what I do to the contained objects.
(The contained objects are instances of subclasses of NSManagedObject.)
I rather expected that NSManagedObjectContext and NSPersistentDocument would just "do the right thing" without further guidance from me.


If you simply add that code to a "vanilla" persistent document app, it Just Works...
Did you do any other configuration?


mmalc

_______________________________________________
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: 
 >subclasses of NSPersistentDocument and NSManagedObjectContext, and undo (From: Don Briggs <email@hidden>)

  • Prev by Date: Re: NSView redisplay - what am I missing?
  • Next by Date: Re: Managed Objects and Unorthodox Objects
  • Previous by thread: subclasses of NSPersistentDocument and NSManagedObjectContext, and undo
  • Next by thread: Odd WebView Bhaviour
  • Index(es):
    • Date
    • Thread