beginUndoGrouping and "dirty" state
beginUndoGrouping and "dirty" state
- Subject: beginUndoGrouping and "dirty" state
- From: Martin Hairer <email@hidden>
- Date: Sun, 30 Apr 2006 22:31:37 +0100
Hi,
My application needs to perform operations that consist of several
"subtasks"
that each can take some time to perform. I thus open an undo group with
beginUndoGrouping and then use endUndoGrouping when the task is
finished.
Undoing such an operation works as expected, *except* that the
document in
question is still in the "dirty" state. A minimal example that
already reproduces this
behaviour is simply given by
-(IBAction)test:(id)sender
{
[[self undoManager] beginUndoGrouping];
[[self undoManager] endUndoGrouping];
}
Calling test will set the dirty state and activate the "Undo" menu
item, which is
expected behaviour. Calling "undo" will then deactivate the "Undo"
menu item
and activate the "Redo" menu item, which is again expected. However,
it will
*not* unset the dirty state of the window. Is this to expected
behaviour? If yes,
why and how should one implement this to get the correct dirty state?
Thanks,
Martin
HairerSoft
http://www.hairersoft.com/
_______________________________________________
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