Re: Menu About to show notification
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