• 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: Updating NSMenu while it's open
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Updating NSMenu while it's open


  • Subject: Re: Updating NSMenu while it's open
  • From: Uli Kusterer <email@hidden>
  • Date: Thu, 19 Apr 2012 09:38:42 +0200

On 19.04.2012, at 04:46, Dave DeLong wrote:
> That's slightly different.  That's run by NSMenuItem's "alternate" mechanism.  It sounds like what the OP was asking for was dynamically adding and removing NSMenuItems while the menu is open.

Just a short caveat: If this menu can change a lot, it will be really annoying to the user if it does so while the menu is pulled down. Imagine a user trying to select an item and another one suddenly being inserted right above it, causing her to pick the wrong menu item at the last split-second. It's good idea to sort items in the menu in a way that keeps their order stable even when new items are added.

 The worst thing one can do is use an unstable sort algorithm causing two items to repeatedly change places. Using Finder on the "Preferences" folder is approaching that level of annoyance these days, it's nigh-impossible to select files from there when sorted by date, because a few files change constantly.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.masters-of-the-void.com




_______________________________________________

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

References: 
 >Updating NSMenu while it's open (From: vinayak pai <email@hidden>)
 >Re: Updating NSMenu while it's open (From: Jerry Krinock <email@hidden>)
 >Re: Updating NSMenu while it's open (From: Graham Cox <email@hidden>)
 >Re: Updating NSMenu while it's open (From: Andy Lee <email@hidden>)
 >Re: Updating NSMenu while it's open (From: Dave DeLong <email@hidden>)

  • Prev by Date: Re: Cocoa equivalent for SetWindowProperty in Carbon
  • Next by Date: Re: Displaying '%' in the UI (Velocityboy)
  • Previous by thread: Re: Updating NSMenu while it's open
  • Next by thread: Re: Updating NSMenu while it's open
  • Index(es):
    • Date
    • Thread