Menu item key equiv mods not correct
Menu item key equiv mods not correct
- Subject: Menu item key equiv mods not correct
- From: Steve Mills <email@hidden>
- Date: Thu, 15 Aug 2013 14:31:36 -0500
When adding some certain-mode-only menus, we scan the existing menus to temporarily remove key equivs that are also in the new menu. They're put back later. However, something isn't right when I ask for each menu item's modifiers. Our Edit menu has Select All, which is command-a. Another menu to the right of it has an item whose equiv is command-shift-a. Everything's hunky dory with those. Then we go to add the new menu, which also uses command-a. We first find the Select All menu which uses the same equiv, so we remove it. But then it also find the other item which uses command-shift-a. Here's the code that looks for matching equivs:
if([item.keyEquivalent length] && ([item.keyEquivalent compare:keyToMatch options:NSCaseInsensitiveSearch] == NSOrderedSame) && item.keyEquivalentModifierMask == modsToMatch)
Both values are very clearly 0x100000, which is only NSCommandKeyMask. But where's the shift key bit? The menu item's mods should be 0x120000. Any ideas about why it's wrong?
--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden