• 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: Menu About to show notification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Menu About to show notification


  • Subject: Re: Menu About to show notification
  • From: Brian Webster <email@hidden>
  • Date: Tue, 29 Jan 2002 00:01:10 -0600

On Monday, January 28, 2002, at 10:39 PM, cocoa-dev-
email@hidden wrote:

Is there any way in cocoa to be informed when a menu is going to be shown.

Something like:
- ( void ) willShowMenu:(NSMenu *)theMenu offMenuItem:(NSMenuItem
*)theMenuItem

I would like to have the opportunity to dynamically generate the menus
contents.

If your menu is set to autoenable items (which is the default setting), then you can implement validateMenuItem: and change the menu's contents from there. This may require you to hook up a target/action for the menu item that displays the submenu that you wish to populate.

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster


  • Prev by Date: initWithURL/NSattributedStrings and NSData
  • Next by Date: Re: Tooltips in NSTableView
  • Previous by thread: Re: Menu About to show notification
  • Next by thread: Another newbie question...
  • Index(es):
    • Date
    • Thread