• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSMenuItem’s userKeyEquivalent lost if changing title
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSMenuItem’s userKeyEquivalent lost if changing title
      • From: Dave Lyons <email@hidden>
  • Prev by Date: Re: Triggering a segue from code
  • Next by Date: Re: NSMenuItem’s userKeyEquivalent lost if changing title
  • Previous by thread: Xcode-like title bar using title bar accessory view
  • Next by thread: Re: NSMenuItem’s userKeyEquivalent lost if changing title
  • Index(es):
    • Date
    • Thread