• 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
Re: [NSUndoManager undoMenuItemTitle]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSUndoManager undoMenuItemTitle]


  • Subject: Re: [NSUndoManager undoMenuItemTitle]
  • From: Mason Mark <email@hidden>
  • Date: Wed, 21 Sep 2005 17:27:43 +0900

On Sep 21, 2005, at 6:25 AM, Martin Hairer wrote:

When I execute

NSLog(@"undoActionName: %@", [_manager undoActionName]);
NSLog(@"undoMenuItemTitle: %@", [_manager undoMenuItemTitle]);

while an undo action is being performed, I get the following output:

undoActionName: Paste
undoMenuItemTitle: &Undo Paste

Does anyone have an idea why there is an ampersand in front of the "Undo"
and how I can get rid of it? Is this the correct behaviour of NSUndoManager?


I asked about this a few years ago.

The essential gist is that this is some cruft left over from the OpenStep/Windows API. The ampersand caused the following letter ("U" in this case) to be highlighted as the "mnemonic" in the menu. (This doesn't work anymore, though.) It appears NSUndoManager is internally using the deprecated -setTitleWithMnemonic: instead of -setTitle:

For more info, see my old thread with an answer from Matt Rollefson of Apple:

http://www.cocoabuilder.com/archive/message/cocoa/2001/12/15/46258

Cheers,
--
Mason Mark
Five Speed Software, Inc.

_______________________________________________
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


  • Follow-Ups:
    • Re: [NSUndoManager undoMenuItemTitle]
      • From: Martin Hairer <email@hidden>
References: 
 >[NSUndoManager undoMenuItemTitle] (From: Martin Hairer <email@hidden>)

  • Prev by Date: Re: Of input loops and games
  • Next by Date: Newbie Q about NSCoder
  • Previous by thread: [NSUndoManager undoMenuItemTitle]
  • Next by thread: Re: [NSUndoManager undoMenuItemTitle]
  • Index(es):
    • Date
    • Thread