• 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: manual item enabling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: manual item enabling


  • Subject: Re: manual item enabling
  • From: Allan Odgaard via Cocoa-dev <email@hidden>
  • Date: Sun, 24 Nov 2019 22:37:17 +0100

On 24 Nov 2019, at 22:28, Kurt Bigler via Cocoa-dev wrote:

[…] The idea for least inefficiency given the global updating pass is to defer (akin to lazy evaluation) the actual menu item updating until the last possible moment. The last possible moment for mouse access is when the user clicks in the menu bar.

Have a look at NSMenu’s delegate property which allows you to set a delegate implementing the NSMenuDelegate protocol: https://developer.apple.com/documentation/appkit/nsmenudelegate

With a menu delegate you can lazily update the menu (menuNeedsUpdate:) or you can even bypass updating the menu for key events by implementing menuHasKeyEquivalent:forEvent:target:action:.
_______________________________________________

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: manual item enabling
      • From: Kurt Bigler via Cocoa-dev <email@hidden>
References: 
 >manual item enabling (From: Kurt Bigler via Cocoa-dev <email@hidden>)

  • Prev by Date: manual item enabling
  • Next by Date: Re: manual item enabling
  • Previous by thread: manual item enabling
  • Next by thread: Re: manual item enabling
  • Index(es):
    • Date
    • Thread