• 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: single vs multiple NIBs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: single vs multiple NIBs


  • Subject: Re: single vs multiple NIBs
  • From: Andrew Merenbach <email@hidden>
  • Date: Thu, 14 Feb 2008 07:37:01 -0800

Hi, Torsten,

If I may put forth an opinion, I personally feel that multiple nibs make a program more modular, and allow for greater separation of code that does different things. Also, (and I admit that this isn't a primary reason to use multiple nibs), if a nib gets corrupted somehow, you will only have to rebuild a fraction of what you have built.

Cheers,
	Andrew

On Feb 14, 2008, at 7:13 AM, Torsten Curdt wrote:


On 14.02.2008, at 16:06, Matt Gough wrote:


On 14 Feb 2008, at 15:57, Torsten Curdt wrote:

I would like get some input on when to use a single NIB and when to load up other NIBs manually.

E.g. there is a PreferenceController example in Aaron's "Cocoa Programming for Mac OSX" that does load the preferences NIB manually when you click on the menu item. What makes me wonder is - why not just include that window into the same MainMenu.nib?


Simple answer - Everything in the nib gets instantiated when the nib is loaded. If the user never chooses to show the preferences all that stuff to do with the preferences window would be wasting memory. Also, the less stuff you have in MainMenu.nib, the quicker your app will load.

Alright that's what I assumed but thought there might have been other reasons as well.


cheers
--
Torsten

_______________________________________________

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

_______________________________________________

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


References: 
 >single vs multiple NIBs (From: Torsten Curdt <email@hidden>)
 >Re: single vs multiple NIBs (From: Matt Gough <email@hidden>)
 >Re: single vs multiple NIBs (From: Torsten Curdt <email@hidden>)

  • Prev by Date: Re: logging object creations and destructions
  • Next by Date: Re: NSView -drawRect optimization
  • Previous by thread: Re: single vs multiple NIBs
  • Next by thread: Re: single vs multiple NIBs
  • Index(es):
    • Date
    • Thread