Re: [NSUndoManager undoMenuItemTitle]
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