• 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: Carlos Weber <email@hidden>
  • Date: Wed, 30 Jan 2002 00:55:52 -1000

On Monday, January 28, 2002, at 05:36 , davidjclark wrote:

> Hello,
>
> 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.

A PB project demonstrating one way to do this (dynamically generating
menu contents) is posted at my iDisk:

http://homepage.mac.com/carlosweber/

The file you want to download is called NuBundleUp.dmg; it contains a
Project Builder project with source code for an application and six
associated plugins, demonstrating how an app can use NSBundle's
facilities to implement plugins, and also how a menu can be created on
the fly. This app generates its menu of plugins by scanning both the
built-in plugin directory (within the application package) and a
user-chosen location which can be anywhere in the filesystem. You can
experiment with the dynamic menu updating by moving the user-defined
plugin directory around, and/or adding and removing plugins, while the
app is running.

David -- hope it helps.

All -- comments are welcome!


References: 
 >Menu About to show notification (From: davidjclark <email@hidden>)

  • Prev by Date: Re: NSTableView, Multiple Selections, and PopUpButtons
  • Next by Date: determining japanese-capable fonts
  • Previous by thread: Re: Menu About to show notification
  • Next by thread: Re: Menu About to show notification
  • Index(es):
    • Date
    • Thread