• 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: Programmatically creating the Application Menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically creating the Application Menu


  • Subject: Re: Programmatically creating the Application Menu
  • From: Jonathan Johnson <email@hidden>
  • Date: Thu, 8 Dec 2005 16:34:26 -0600

On 12/8/05, Jonathan Johnson <email@hidden> wrote:
> On 12/8/05, Jonathan Johnson <email@hidden> wrote:
> > Part curiosity, part usefulness, how does one create the application
> > menu via code? [NSApplication setMainMenu:] seems to not touch the
> > application menu, and it remains blank. How do you add items to the
> > application menu (assuming no nib file)? Is there a way to create the
> > standard set of items for the application menu?
>
> I'll elaborate. If I don't call [NSApplication setMainMenu:], there is
> one top-level menu automatically created for me (the application
> menu).

Ok, I finally found it. There's a hidden method called setAppleMenu
that I guess was previously (before 10.4) exposed on the NSApplication
class, and now it's been removed from the header, but still works.
Strange... filed a radar.

-Jon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Programmatically creating the Application Menu (From: Jonathan Johnson <email@hidden>)
 >Re: Programmatically creating the Application Menu (From: Jonathan Johnson <email@hidden>)

  • Prev by Date: menu-free app (problem solved)
  • Next by Date: Re: KVC setter selector from property name
  • Previous by thread: Re: Programmatically creating the Application Menu
  • Next by thread: Do I need to make drag images transparent myself?
  • Index(es):
    • Date
    • Thread