• 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
undo menu name for meta group of undoable actions?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: [NSColor colorUsingColorSpaceName:NSCalibratedRGBColorSpace]
  • Next by Date: [ANN] ActiveWire OS X Driver & Framework
  • Previous by thread: [NSColor colorUsingColorSpaceName:NSCalibratedRGBColorSpace]
  • Next by thread: [ANN] ActiveWire OS X Driver & Framework
  • Index(es):
    • Date
    • Thread