Allowing Undo without dirtying NSDocument [Leopard]

  • 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.
previous month october 2007 next month
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Go to today