Subject: Re: several windows in a NIB ?

On Mar 27, 2009, at 17:34 , Sean McBride wrote:

On 3/27/09 12:11 PM, I. Savant said:

... it suddenly occurs to me that nothing prevents me from having
several top-level windows
in a single NIB, i.e. the Track Editor Panel may just as well be
defined in the same NIB as
the main window, and that simplifies things a lot.

A question however : is this regarded as good practice ? And can I still
easily show or hide the panel window if it's not defined in its own NIB ?

There is nothing wrong with this, IMO. The only two considerations:

1 - If you have a "heavy" interface that does not all need to be
loaded (ie, some windows may not be used during an entire session),
you'd want to separate things out into their own nibs to shorten
launch time.

2 - In a larger, more complicated project, organization and working
within IB can become a problem with a monolithic nib. Especially if
the nib becomes corrupted at some point ...

3 - The nib and xib file formats to not diff & merge nicely. So if you
develop in a team, it's nearly impossible for more than one person to
change a nib at the same time (unlike source code). This is a good
reason to keep nibs small.

Thanks to both of you, I figured having a monolithic nib/xib would indeed become a problem over time, though I was more concerned about other more subtle issues that I wouldn't know about. I guess I'll go ahead and stick to the "1 windows per nib" policy.



Cocoa-dev mailing list (Cocoa-dev@xxxxxxxxxxxxxxx)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)

Help/Unsubscribe/Update your Subscription...


This email sent to maillists@xxxxxxxxx