How do I remove the blank window in each project?

Hi,
Everytime I create a new project, modify the MainWindowController.xib and compile the project then I see two windows: one with the appropriate UI controls and a second blank one. My question is how do I remove or delete the second blank window?

Cheers,
Hu

Are you deleting the blank window in the MainMenu.xib file that Xcode creates by default? The best summary of the steps for creating a single window application from the Xcode template is in Chapter 6 “Setting up SpeakLine” and after figure 6.2…

[quote=“Excerpt From: ‘Cocoa Programming for OS X’. Aaron Hillegass, Adam Preble & Nate Chandler”]

Change the application to be an application with a single window controller:[ol]

[li][color=#0040FF]Delete the window: Open MainMenu.xib. From the document outline, select and delete the object labeled SpeakLine[/color]. [This NSWindow object will be created automatically by Xcode and will be labelled with the project name.]

[/li]
[li]Create the window controller class with a XIB file: Create a new Cocoa class. (Control-click on the SpeakLine group in the project navigator, select New File…, and then choose the Cocoa class template.) Name it MainWindowController and make it a subclass of NSWindowController (Figure 6.3). Check the box labeled Also create XIB file for user interface to let the class template create the XIB for you.

[/li]
[li]Override windowNibName in the window controller class: Open MainWindowController.swift and add the following code:

[/li]
[li]Update the code in AppDelegate.swift: In AppDelegate.swift, you are going to replace the existing code with code that initializes an instance of MainWindowController. This is the same code you used in RGBWell and RandomPassword, and you will use it again in later projects. Instead of typing it over and over again (or copying and pasting), you are going to create a code snippet.[/li][/ol][/quote]