• 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: Main Nib File and MainMenu Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Main Nib File and MainMenu Question


  • Subject: Re: Main Nib File and MainMenu Question
  • From: Fritz Anderson <email@hidden>
  • Date: Sun, 21 Dec 2003 02:54:32 -0600

You're fighting the framework.

The main nib of the application specifies once-per-application things like the main menu. That's the _definition_ of the main nib. If you have an application whose main nib contains no menu, you have an application with no menu. To wish otherwise is like wishing you could mount your headlights under the back seat.

A document nib specifies once-per-document things. The document architecture is built on this assumption. Zero documents is a legal state (indeed is the initial state, however briefly) of a Cocoa application. An application that can't run without seeing a document nib must have a _very_ unusual circumstance.

Maybe you could back up and explain your unusual circumstances?

-- F

On Dec 20, 2003, at 3:33 PM, Oliver Cameron wrote:

I have 2 nib files, MainMenu.nib (with my main menu in) and Document.nib (with my document window in). My Document.nib's Files Owner is a NSDocument subclass. Basically, for some code to work I need to make Document.nib the Main Nib File (can be set in target -> properties in Xcode). But of course, doing this will show no menu. I don't want to put the menu in Document.nib but rather keep it in MainMenu.nib.

I would like to stress that the Main Nib File has to be Document.nib for the application to work.

So my question is, how do I load the MainMenu.nib and load the Menu, yet still keep Document.nib as the Main Nib File?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Main Nib File and MainMenu Question (From: Oliver Cameron <email@hidden>)

  • Prev by Date: Re: [newbie] memory mgmt question
  • Next by Date: Re: Printing NSTableView and more
  • Previous by thread: Main Nib File and MainMenu Question
  • Next by thread: Splash screens
  • Index(es):
    • Date
    • Thread