no change counts from CoreData undoManager
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