Is it OK to setKeyEquivalent during validateMenuItem
Is it OK to setKeyEquivalent during validateMenuItem
- Subject: Is it OK to setKeyEquivalent during validateMenuItem
- From: Steve Mills <email@hidden>
- Date: Fri, 16 Aug 2013 14:18:33 -0500
I'm looking at a problem where some key equivs are going to the wrong menu items. Our Zoom Out menu item is always present and uses command-minus. One particular tool adds its own menu which includes items that use command-minus and command-shift-minus. This menu does NOT use autoenable, but enables its items all at once, although the top-level item for this menu (the one that lives in the menubar) does go through our validateMenuItem method, where we set up the entire menu. Part of the set-up includes setting key equivs on the items in that menu, which will also cache away and remove matching items in the normal menus.
I see the validateMenuItem method being called as part of performKeyEquivalent when I type command-shift-minus. We set up the key equivs for the special tool menu, and the items are enabled, but then the key equiv ends up going to Zoom Out.
--
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