NSUndoManager returns menu item titles with unwanted ampersand ("&Undo Typing")
NSUndoManager returns menu item titles with unwanted ampersand ("&Undo Typing")
- Subject: NSUndoManager returns menu item titles with unwanted ampersand ("&Undo Typing")
- From: Mason Mark <email@hidden>
- Date: Fri, 14 Dec 2001 15:20:24 -0800
Howdy,
I sometimes need to ask my document's undo manager for the title of the
undo and redo menu items. There are a couple documented methods, but
they don't seem to work right to me:
[myUndoManager undoActionName]; // <- returns "Typing", correct
[myUndoManager undoMenuItemTitle]; // <- returns "&Undo typing", why
the "&"?
Similarly:
[myUndoManager undoMenuTitleForUndoActionName:[myUndoManager
undoActionName]]; // <- returns "&Undo Typing"
Does anybody know why it wants to give me the menu item titles prepended
by an unwanted ampersand?
Our document class actually manages multiple undo managers, and so I
need this information to set the menu title that is displayed to the
user. Checking for the ampersand and removing it works, sure, but it
makes me uneasy that I do not know why the ampersand appears, nor do I
know how this might play out on non-English OS versions.
Anybody know what I'm missing? (Or is it just a bug?)
Thanks,
--
Mason