Creating ".nib" Files Without Using the Included Template

It is best to use the included template for creating your own custom nib files because the process for creating them from scratch can be a bit confusing. Nevertheless the process is described below for those who are curious:

  • Launch interface builder

  • Create a new "Cocoa, Empty" nib file

  • In the document window, click on the "Classes" tab

  • Control-click on "NSObject", select the menu entry "subclass NSObject". A new object called "MyObject" will appear--rename this object to "slBreveNibLoader"

  • With the slBreveNibLoader object selected, bring up the info window with Command-1

  • In the "Outlet" tab of this window, click add. Name the new outlet "window".

  • Click back to the "Instances" tab of the project. Click on "File's Owner", and type Command-5 to bring up the "Custom Class" inspector. Find the object "slBreveNibLoader" from this list and select it.

  • Go back to the "Instances" tab of the project. From the "Cocoa Views" palette, drag a "Window" object to the "Instances" area.

  • Select the "File's Owner" icon. Control-click and drag from the "File's Owner" icon to the icon of the newly created window.

  • In the "File's Owner" info window that appears, select the item "window" and then click on the connect button.