• 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: How does a new app learn about its menu?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How does a new app learn about its menu?


  • Subject: Re: How does a new app learn about its menu?
  • From: Quincey Morris <email@hidden>
  • Date: Fri, 17 Apr 2009 13:19:57 -0700

On Apr 17, 2009, at 12:23, Darren Minifie wrote:

I have what I think is a pretty straight forward question about an app's
main menu. When creating a new Cocoa app in xCode, the final build seems to
just know about how to load its menu. there doesn't seem to be any mention
of the NSMenu object in the info.plist, the sourcecode, or a connection in
interface builder. I'm curious to know how NSApplication first finds and
sets its main menu. The reason I ask is, I would like to learn how to build
applcations using a plugin approach (kindof like eclipse / osgi) and it
would be great to be able to dynamically add new menu entries based on what
plugins are loaded at runtime. thank you for your help.

The application loads the main menu from the main menu nib file, and you can specify the name of that file in the build target's properties (the same place where you put the bundle identifier and the document type supported by the application).


If you want to add things to the main menu, look at NSApplication's mainMenu method. You don't have to care how it gets there, if all you want to do is add things to it.


_______________________________________________

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: 
 >How does a new app learn about its menu? (From: Darren Minifie <email@hidden>)

  • Prev by Date: SQLite 3 crash report - debugging help needed
  • Next by Date: mouseDragged: with NSTableView
  • Previous by thread: How does a new app learn about its menu?
  • Next by thread: Problem: sqlite3 and .sqlite-journal files
  • Index(es):
    • Date
    • Thread