Re: NSApplicationMain & Main NIB File
Re: NSApplicationMain & Main NIB File
- Subject: Re: NSApplicationMain & Main NIB File
- From: Paul Sargent <email@hidden>
- Date: Fri, 9 May 2008 12:48:57 +0100
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.
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._______________________________________________
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