• 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
Re: Rebuilding menus (menuNeedsUpdate:) and System Preferences keyboard shortcuts.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rebuilding menus (menuNeedsUpdate:) and System Preferences keyboard shortcuts.


  • Subject: Re: Rebuilding menus (menuNeedsUpdate:) and System Preferences keyboard shortcuts.
  • From: "I. Savant" <email@hidden>
  • Date: Mon, 1 Dec 2008 16:36:32 -0500

> At first I thought the solution was obvious: I was building these menus as needed, in the NSMenu delegate method, -menuNeedsUpdate: This method only gets called when the user goes to look at the menu. So, if these dynamic menus were only built in -menuNeedsUpdate:, then clearly the keyboard shortcuts defined in System Preferences for any items in such menus would note work until after the user had opened the menu at least once (thus populating it in -menuNeedsUpdate: and allowing the defined shortcut actually to apply to something, because before this the menu wouldn't have existed).

  I've noticed a bug where calling -[NSMenuItem setKeyEquivalent:]
does not update unless you first set it to @"" then to the target. I
don't believe I remembered to file this with Apple ...

--
I.S.
_______________________________________________

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: Rebuilding menus (menuNeedsUpdate:) and System Preferences keyboard shortcuts.
      • From: "I. Savant" <email@hidden>
References: 
 >Rebuilding menus (menuNeedsUpdate:) and System Preferences keyboard shortcuts. (From: Keith Blount <email@hidden>)

  • Prev by Date: Rebuilding menus (menuNeedsUpdate:) and System Preferences keyboard shortcuts.
  • Next by Date: Re: Rebuilding menus (menuNeedsUpdate:) and System Preferences keyboard shortcuts.
  • Previous by thread: Rebuilding menus (menuNeedsUpdate:) and System Preferences keyboard shortcuts.
  • Next by thread: Re: Rebuilding menus (menuNeedsUpdate:) and System Preferences keyboard shortcuts.
  • Index(es):
    • Date
    • Thread