• 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
NSUndoManager returns menu item titles with unwanted ampersand ("&Undo Typing")
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSUndoManager returns menu item titles with unwanted ampersand ("&Undo Typing")
      • From: Matt Rollefson <email@hidden>
  • Prev by Date: Re: Mac OS X Icons Template
  • Next by Date: Re: Mac OS X Icons Template
  • Previous by thread: Re: project builder question (check marks)
  • Next by thread: Re: NSUndoManager returns menu item titles with unwanted ampersand ("&Undo Typing")
  • Index(es):
    • Date
    • Thread