title: How to reopen the window of app, Xcode
body: <p>I am reading "Cocoa programming for OS X" (The Big Neard Ranch Guid) and I have made a simplest application to test an empty windows app with a window controller and xib file for this controller. I have wrote all necessary code according to the book but after building the app and closing the window of app I cannot reopen the window of the app. What is wrong ? Below the code. (I deleted window in MainMenu.xib and accordingly changed AppDelegate; and Visible at Launch box is unchecked)
  ). The book says that showWindow(_:) will reopen the window, but I don't see this !</p>
  
  <pre><code>import Cocoa
  
   @NSApplicationMain
   class AppDelegate: NSObject, NSApplicationDelegate {
  
  var control: Control?
  
  func applicationDidFinishLaunching(aNotification: NSNotification) {
  
      //Create a window controller object
      let control = Control()
  
      //Put the window of the window controler om the screen
      control.showWindow(self)
  
      //Set the propertity to point to window controler
      self.control = control
  
  }
  
  
  func applicationWillTerminate(aNotification: NSNotification) {
      // Insert code here to tear down your application
  }
  
  
  }
  </code></pre>
  
  <p>in my controller class</p>
  
  <pre><code>import Cocoa
  class Control: NSWindowController
  {
      override var windowNibName: String?
          {
              return "Control"
  }
  }
  </code></pre>
  
  <p>In File's Owner identity is for Control controller and window has been connected to window outlet. </p>