• 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: Problem setting the menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem setting the menu


  • Subject: Re: Problem setting the menu
  • From: Peter Ammon <email@hidden>
  • Date: Mon, 29 Sep 2008 13:02:04 -0700

On Sep 28, 2008, at 4:15 PM, Felipe Monteiro de Carvalho wrote:

Hello,

I am having problems setting a menu for my application. I am writting
the application in Object Pascal and I am not using nib files, because
the point is being able to use this to port cross-platform GUI
libraries.

NSMenu needs a minimal nib to properly set up the application menu. You can construct your other menus programmatically however.




I create a NSMenu and set it to both AppleMenu and MainMenu, or just 1
of them, but nothing happens!! I always get just an empty menu. I have
read tutorials out there, but according to them this code should work.


The main menu contains some items, and those items have submenus, and the titles of those submenus are what appear in the menu bar. Your main menu items do not have any submenus, which is why you're not seeing anything in the menu bar. If you give the menu item a submenu, you'll see it in the menu bar.


-Peter
_______________________________________________

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: 
 >Problem setting the menu (From: "Felipe Monteiro de Carvalho" <email@hidden>)

  • Prev by Date: Re: Crash with toolbars
  • Next by Date: Resize Indicator on a NSPanel
  • Previous by thread: Problem setting the menu
  • Next by thread: Crash with toolbars
  • Index(es):
    • Date
    • Thread