• 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
beginUndoGrouping and "dirty" state
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Send AppleEvent from System Prefs
  • Next by Date: Re: Creating alias to app for PDFService
  • Previous by thread: Re: Send AppleEvent from System Prefs
  • Next by thread: Drag and drop not working from NSMatrix subclass
  • Index(es):
    • Date
    • Thread