• 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: replacing carbon menu with cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: replacing carbon menu with cocoa


  • Subject: Re: replacing carbon menu with cocoa
  • From: Peter Ammon <email@hidden>
  • Date: Mon, 13 Oct 2008 12:27:05 -0700


On Oct 13, 2008, at 5:18 AM, Esteban Lorenzano wrote:

Hi,
I'm new to the list -and to cocoa-, and I don't know if what I want to do is possible: I'm writing a plugin for a previous existent application made in carbon, the application will take over the old app behavior, and for that, it needs to replace the menu with a new one...
I read documentation, saw examples and followed old threads on this list, and no one is very clear about this... ¿Is it possible? ¿how?

You should make a nib from the "Application" template in Interface Builder, then load it via [NSBundle loadNibNamed:...]. Its main menu will replace the current main menu.



I already tried

[ NSApp setMainMenu: myMenu ]

It does not fail, but nothing happens :(

It's hard to say what this would do without seeing the code that creates myMenu. But there's some problems creating a main menu programmatically; using a nib is the best approach.


-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


  • Follow-Ups:
    • Re: replacing carbon menu with cocoa
      • From: Esteban Lorenzano <email@hidden>
References: 
 >replacing carbon menu with cocoa (From: Esteban Lorenzano <email@hidden>)

  • Prev by Date: Re: waiting for an NSThread
  • Next by Date: Re: PopupButton in IB 3.1 ToolBar
  • Previous by thread: replacing carbon menu with cocoa
  • Next by thread: Re: replacing carbon menu with cocoa
  • Index(es):
    • Date
    • Thread