NSMenuItem’s userKeyEquivalent lost if changing title
NSMenuItem’s userKeyEquivalent lost if changing title
- Subject: NSMenuItem’s userKeyEquivalent lost if changing title
- From: Allan Odgaard <email@hidden>
- Date: Tue, 20 Sep 2016 07:59:32 +0200
Some menu items use titles dynamically updated in validateMenuItem:
(based on application state, like if there are selected content).
This seems to be incompatible with System Preferences → Keyboard →
Shortcuts → App Shortcuts, as the menu item check for custom bindings
using their current title rather than original title.
I notice however that Finder is not affected by this. For example if I
add a custom shortcut for “Compress” then this it still work with
selected content (which updates the menu item’s title).
Anyone know how to go about handling dynamic menu item titles and still
support custom app shortcuts?
_______________________________________________
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