• 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: NSApplicationMain & Main NIB File
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSApplicationMain & Main NIB File


  • Subject: Re: NSApplicationMain & Main NIB File
  • From: Simon Wolf <email@hidden>
  • Date: Fri, 9 May 2008 14:41:39 +0100

On 9 May 2008, at 12:48, Paul Sargent wrote:

On 9 May 2008, at 10:10, Simon Wolf wrote:
I'm going to apologise here in my first contribution to this list for the potential stupidity of my questions. I'm a VB developer who has been a Mac user for several years but I'm only now starting to dip my toe into XCode and I think that I'm going to have loads of questions, some practical and some more theoretical like the one below.

No problem. Everybody has to learn.

Be respectful & ask good (i.e. well formed) questions and I'm sure everybody will be happy to help.

Welcome.

Thank you and I'll try to behave!

I know for the documentation that NSApplicationMain 'loads the main nib file from the application’s main bundle, and runs the application' but I was wondering what defines a NIB (or XIB) as being the main one if you have a project containing several NIBs. Is it just the fact that it includes an NSMenu called MainMenu?

As an alternative answer to Stephan's (which isn't incorrect, but only half the story):


You'll notice that there's a file called Info.plist in your project. This file defines various things about your app bundle. The one you're looking for is the NSMainNibFile property. This is changed when you edit the setting Stephan described.

Others that are worth being aware of (from a start-up behaviour point of view) are NSPrincipalClass*, and CFBundleExecutable. I doubt you'll ever need to change them though.

* I believe this is used more for bundle based plug-ins than apps.

Thank you for the additional information and it's led me to Apple's 'Runtime Configuration Guidelines' which I'm just starting to browse through. So much to learn ... but what a fantastically refreshing change from VB6 and .Net.


Simon_______________________________________________

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: NSApplicationMain & Main NIB File
      • From: Jens Alfke <email@hidden>
References: 
 >NSApplicationMain & Main NIB File (From: Simon Wolf <email@hidden>)
 >Re: NSApplicationMain & Main NIB File (From: Paul Sargent <email@hidden>)

  • Prev by Date: Re: NSPopUpButton again
  • Next by Date: Re: Threading - How its done?
  • Previous by thread: Re: NSApplicationMain & Main NIB File
  • Next by thread: Re: NSApplicationMain & Main NIB File
  • Index(es):
    • Date
    • Thread