Forcing undoManager to start a new group?
Forcing undoManager to start a new group?
- Subject: Forcing undoManager to start a new group?
- From: Duncan Campbell <email@hidden>
- Date: Mon, 12 Dec 2005 17:52:32 +1100
Hi list.
I have an NSDocument subclass wired up to an NSTextView, that I
having some difficulty with the default undoManager behaviour:
When i save my document (not using any of the NSDocument save methods
- this could be the problem), I wish to "reset" the undoManager so
that any typing registers as a new undo. However, I do not want to do
removeAllActions: since i still want to be able to undo after save.
In searching thru the list it would seem that sending NSChangeDone to
updateChangeCount: does what I want (referenced here: http://
www.cocoabuilder.com/archive/message/cocoa/2005/3/2/129331), but this
does not seem to be working - performing undo after this method call
undoes the previous action also.
I have also tried beginUndoGrouping: but this gives errors about
nested groups when i undo.
Can anyone shed any light on this?
Many thx.
Duncan
_______________________________________________
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