Menu Item's Key Equivalents Affecting Other Item
Menu Item's Key Equivalents Affecting Other Item
- Subject: Menu Item's Key Equivalents Affecting Other Item
- From: Seth Willits <email@hidden>
- Date: Fri, 6 May 2005 19:55:17 -0700
I don't know what it is, but Cocoa and I just aren't getting along
today.
Here's a small sample project that demonstates the problem:
http://www.freaksw.com/MenuItemBug.zip
The latest problem I'm having is a simple case where by changing one
menu item's key equivalent, it changes another's as well. I'm
attempting to do the same thing as Safari where it shifts around
which menu item uses Cmd-W and which is Cmd-Shift-W.
Essentially I have:
- (void)windowDidBecomeKey:(NSNotification *)aNotification
{
// Close Window Menu Item
[CloseWindowItem setKeyEquivalent:@"W"];
[CloseWindowItem setKeyEquivalentModifierMask:NSCommandKeyMask |
NSShiftKeyMask];
// Close Document Menu Item
[CloseDocumentItem setKeyEquivalent:@"W"];
[CloseDocumentItem setKeyEquivalentModifierMask:NSCommandKeyMask];
}
And when the window is key, BOTH menu item's have Cmd-Shift-W as
their key equivalent.
Seth Willits
----------------------------------------------------------
Freak Software - http://www.freaksw.com/
ResExcellence - http://www.resexcellence.com/realbasic/
----------------------------------------------------------
_______________________________________________
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