• 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
no change counts from CoreData undoManager
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

no change counts from CoreData undoManager


  • Subject: no change counts from CoreData undoManager
  • From: Niko Matsakis <email@hidden>
  • Date: Wed, 28 Sep 2005 10:54:56 +0200

Does anyone have any suggestion as to why my document is not being marked as dirty?

I am using CoreData, and I am simply using the managed object context's undo manager for the document's undo manager. There are no custom window controllers involved, and very little customization of any sort.

i.e., my NSPersistentDocument class has the following method (is this method even needed?):
- undoManager
{
return [[self managedObjectContext] undoManager];
}


Undo/Redo works great, but no matter how many changes have occurred the document is always considered clean.

I gather that from the Document-Based Applications FAQ that this change count should be updated relatively automatically --- i.e., the NSDocument should be listening for notifications from the NSUndoManager: "If the document has an undo manager, it observes the undo manager and automatically updates the change count when changes are done, undone, or redone". I added my own listener and I see many CheckpointNotification and UndoChangeNotification/ RedoChangeNotification events being posted.

I see that other people on the list have had this problem, but nobody seems to have solved it.

Thanks for any help!


Niko _______________________________________________ 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
  • Follow-Ups:
    • Re: no change counts from CoreData undoManager
      • From: mmalcolm crawford <email@hidden>
    • Re: no change counts from CoreData undoManager
      • From: Frode <email@hidden>
  • Prev by Date: Re: NEWBIE - production version - still having problems
  • Next by Date: Core Data App vs. Core Data Doc-based App: which is appropriate?
  • Previous by thread: Re: NEWBIE - production version - still having problems
  • Next by thread: Re: no change counts from CoreData undoManager
  • Index(es):
    • Date
    • Thread