Adding a new menu programmatically

2008-09-30 Thread Matthew Gertner
Hi, I'm trying to add a new menu to the main menu of my application using Cocoa. I thought something like this would do the trick: NSMenu* menu = [[NSMenu alloc] initWithTitle:@"foo"]; NSMenuItem* item = [[NSApp mainMenu] addItemWithTitle:@"foo" action: nil keyEquivalent: @""];

Re: Adding a new menu programmatically

2008-09-30 Thread Colin Barrett
On Tue, Sep 30, 2008 at 1:20 PM, Matthew Gertner <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to add a new menu to the main menu of my application using > Cocoa. I thought something like this would do the trick: > > NSMenu* menu = [[NSMenu alloc] initWithTitle:@"foo"]; > NSMenuItem* item = [[N

Re: Adding a new menu programmatically

2008-09-30 Thread Jason Coco
On Sep 30, 2008, at 16:20 , Matthew Gertner wrote: Hi, I'm trying to add a new menu to the main menu of my application using Cocoa. I thought something like this would do the trick: NSMenu* menu = [[NSMenu alloc] initWithTitle:@"foo"]; NSMenuItem* item = [[NSApp mainMenu] addItemWithTitle:@"f