Allowing Undo without dirtying NSDocument [Leopard]
David Dunham
dunham at mac.com
Sun Oct 28 23:07:04 PDT 2007
My Cocoa app had some undoable actions that changed the user's view,
but shouldn't mark the document as dirty. In Tiger I could use
- (void) undoableActionDoesntDirtyDocument
{
// This action, while undoable, shouldn't mark the document dirty
NSDocument* doc = [[[self window] windowController] document];
[doc updateChangeCount:[[doc undoManager] isUndoing] ? NSChangeDone :
NSChangeUndone];
}
but in Leopard, my window gets the dot and the document is considered
dirty.
How can I make an action undoable without the document thinking a save
is necessary?
David Dunham A Sharp, LLC
Voice/Fax: 206 783 7404 http://a-sharp.com
Efficiency is intelligent laziness.
More information about the MacOSX-dev
mailing list