• 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:Dynamically chaning menu items of NSMenu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:Dynamically chaning menu items of NSMenu


  • Subject: Re:Dynamically chaning menu items of NSMenu
  • From: Kirk Kerekes <email@hidden>
  • Date: Fri, 2 Aug 2002 10:09:31 -0500

I ran into this same problem, and could find no really "clean" solution.

I have a submenu that tracks the contents of a special folder.

I ended up with a repeating timer whose target routine checks to see if the menu needs updating every few seconds, and if it does, it updates it. This actually has some UI benefit, because the routine to rebuild the submenu doesn't run while the user is waiting for the submenu to appear.

You could use the menu-validating system to tell you when a menu is about to be displayed, but I would be careful to avoid introducing delays into the menu-display process. It makes your app feel unresponsive and slow.

On Friday, August 2, 2002, at 08:59 AM, email@hidden wrote:

Message: 12
Date: Fri, 02 Aug 2002 08:58:18 -0400
Subject: Dynamically chaning menu items of NSMenu
From: Manoj Patwardhan <email@hidden>
To: <email@hidden>

I would like to rebuild a menu (NSMenu) just before it is pulled down. Is
there a way to do this in Cocoa?

I searched the archives and could not find anything on this.

Thanks,

Manoj Patwardhan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Private NIBs?
  • Next by Date: Re: Creating a clickable (web-browser-like) URL control
  • Previous by thread: Dynamically chaning menu items of NSMenu
  • Next by thread: encodeConditionalObject:
  • Index(es):
    • Date
    • Thread