4

Inside the MainMenu.xib I deleted the default Main Menu that automatically gives you the application menu (along with the File/Edit/Format/View/Window/Help menus).

What are the steps I need to take to add this back into my application?

gcamp
  • 14,622
  • 4
  • 54
  • 85
zadam
  • 2,416
  • 2
  • 23
  • 32

1 Answers1

6

I would create a new application then copy just the Main Menu back into your MainMenu.xib

Peter Hosey
  • 95,783
  • 15
  • 211
  • 370
WrightsCS
  • 50,551
  • 22
  • 134
  • 186
  • Thanks, this worked. I'd still like to understand the 'magic' that relates this Menu to the application as it's main menu. – zadam Jun 10 '11 at 03:22
  • 3
    @zadam: There's no magic. It's just a complete main menu that Apple created for you and supplied in the nib in each application template. That menu is the main menu because the application's `mainMenu` outlet is hooked up to it. – Peter Hosey Jun 10 '11 at 06:38
  • - Peter: where is the application's mainMenu outlet hooked up to it? – zadam Jun 10 '11 at 11:46
  • @zadam: In the MainMenu nib, where the main menu resides and the application is the File's Owner. Right-click on the main menu and you should see the application's `mainMenu` as a referencing outlet. – Peter Hosey Jun 12 '11 at 05:13
  • 1
    @PeterHosey I expected this to be the case, but no "mainMenu" outlet appears in Interface Builder for either File's Owner or the Application instance. Only delegate and dockMenu appear. – MikeyWard Aug 16 '12 at 23:38
  • @MikeyWard: Correct. The `mainMenu` outlet is no longer exposed in Xcode's nib editor. Only the older separate Interface Builder shows it. WrightsCS's solution is now the only way. – Peter Hosey Aug 17 '12 at 01:41
  • That's a bummer. It's disappointing from a philosophical perspective that one can't have a nibless project. – MikeyWard Aug 28 '12 at 20:24