(Ooh! I know that one!)
The custom shortcut for Finder's File > Compress menu item continues to work,
because Finder goes slightly out if its way to achieve it. The item's -title
remains unchanged as ”Compress”, even when you see "Compress “foo”" or
"Compress 42 Items” -- in that case, you're seeing the -attributedTitle.
(Ditto for "Burn to Disc…” item.)
Small downside: If you look carefully while the menu item is disabled, it looks
a bit different from other disabled menu items.
> On Sep 19, 2016, at 10:59:32 PM, Allan Odgaard <lists+cocoa-...@simplit.com>
> 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 (Cocoaemail@example.com)
> 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 dly...@apple.com
Cocoa-dev mailing list (Cocoafirstname.lastname@example.org)
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 arch...@mail-archive.com