FROM : Jonathon Mah
DATE : Wed Apr 06 16:57:01 2005
On 6 Apr 2005, at 22:58, Lorenzo wrote:
> The PROBLEM now is that the method undoMenuItemTitle returns a string
> starting with a "&" (amazing, why?) so I get something like
> "&Undo Move Object"
> "&Redo Move Object"
I'm gonna take a stab in the dark here. Perhaps it's a localization
thing? (It's "Undo" for English, but not necessarily for anything
else.) Or maybe it's a keyboard shortcut thing (a la Windows'
underlined letters) from NextStep (if that had them)?
> This seems to be a Cocoa bug. Anyway, why should I manage the undo menu
> items by myself? Just because I override the validateMenuItem method?
You should be doing something like this (in pseudocode):
- (BOOL)validateMenuItem:(NSMenuItem*)theItem
{
if (theItem is some item I made)
return YES;
else
return [super validateMenuItem:theItem];
}
Jonathon Mah
<email_removed>
DATE : Wed Apr 06 16:57:01 2005
On 6 Apr 2005, at 22:58, Lorenzo wrote:
> The PROBLEM now is that the method undoMenuItemTitle returns a string
> starting with a "&" (amazing, why?) so I get something like
> "&Undo Move Object"
> "&Redo Move Object"
I'm gonna take a stab in the dark here. Perhaps it's a localization
thing? (It's "Undo" for English, but not necessarily for anything
else.) Or maybe it's a keyboard shortcut thing (a la Windows'
underlined letters) from NextStep (if that had them)?
> This seems to be a Cocoa bug. Anyway, why should I manage the undo menu
> items by myself? Just because I override the validateMenuItem method?
You should be doing something like this (in pseudocode):
- (BOOL)validateMenuItem:(NSMenuItem*)theItem
{
if (theItem is some item I made)
return YES;
else
return [super validateMenuItem:theItem];
}
Jonathon Mah
<email_removed>
| Related mails | Author | Date |
|---|---|---|
| Lorenzo | Mar 16, 00:01 | |
| Robert Clair | Mar 16, 00:42 | |
| Lorenzo | Apr 6, 10:56 | |
| Lorenzo | Apr 6, 13:23 | |
| Jonathon Mah | Apr 6, 13:29 | |
| Lorenzo | Apr 6, 15:28 | |
| Jonathon Mah | Apr 6, 16:57 | |
| Lorenzo | Apr 6, 17:40 |






Cocoa mail archive

