undo menu name for meta group of undoable actions?
undo menu name for meta group of undoable actions?
- Subject: undo menu name for meta group of undoable actions?
- From: Seth Delackner <email@hidden>
- Date: Mon, 6 Oct 2003 21:43:26 +0000
- Mail-followup-to: email@hidden
I have an undoable method that is made up of calls to two
other undoable methods. Undoing this group unfortunately
leaves the undo/redo menus showing the action names of one
or the other of the sub-group entries. The code is
something like:
[undoManager beginUndoGrouping];
[undoManager setActionName: @"Group"];
[self foo : undo: undoManager];
[self bar : undo: undoManager];
[undoManager setActionName: @"Group"];
[undoManager endUndoGrouping];
Each of foo and bar make an undo group, set the action name,
do something, and close their group.
Now, I tried having the enclosing meta-group set an action
name both before and after the other methods did their
thing, but either way, undoing the meta-group results in the
redo menu having the title of foo or bar, I forget which.
The only way I have found to avoid this is to have the meta
group begin by preparing an undo invocation target of self,
with a method that just does [undo setActionName:
groupName].
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.