• 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: Use one nib file or lots?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use one nib file or lots?


  • Subject: Re: Use one nib file or lots?
  • From: Drew McCormack <email@hidden>
  • Date: Sun, 7 Oct 2001 11:35:54 -0700

Having several NIB files means they can be loaded separately, as you say. But I also think using several NIB files, and multiple window controllers, just leads to more modular, and readable code. Originally, I thought it would easier to just have one NIB and a big controller, but it gets difficult to keep track of what is happening. Having a different controller for each window makes the responsibilities of each class clearer, and the code much more readable. It is a bit more difficult to achieve things involving more than one NIB, but I find this ultimately leads to better, more loosely coupled code, because you are forced to use notifications and such.

Drew McCormack


On Saturday, October 6, 2001, at 08:12 PM, Brian Hook wrote:

Good question, and one that I also have (as a fellow newbie). Near as I can tell, the primary advantage is that resources inside an unused NIB file aren't loaded. In exchange you have to deal with the hassles of cross-NIB connections and implementing multiple window controllers.

It would be nice to see an authoritative and comprehensive discussion on this; maybe one of the Web sites (Stepwise, CocoaDev, CocoaDevCentral) could take a stab at an FAQ on this.

Brian

At 10:43 PM 10/6/01 -0400, Mike O'Connor wrote:
Newbie question: What are the advantages of having many nib files in an app,
as opposed to putting all document, dialog and menu items in one nib? IT
seems like it would be easier to make connections if it is all in one file.
What's the right way to do it and why?
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev


References: 
 >Re: Use one nib file or lots? (From: Brian Hook <email@hidden>)

  • Prev by Date: Re: Static instance variables and class methods...
  • Next by Date: Re: Well, isn't this tantalizing?
  • Previous by thread: Re: Use one nib file or lots?
  • Next by thread: Posix message queues
  • Index(es):
    • Date
    • Thread