title: How to open an NSWindowController from another NSWindowController in Cocoa
body: <p>I'm developing an app in cocoa for MacOSX in Xcode5 and I want to open another window from my current window by pressing a button, this is my code:</p>
  
  <pre><code>- (IBAction)openWindow:(id)sender {
  
      WindowController *controllerWindow = [[WindowController alloc] initWithWindowNibName:@"WindowController"];
      [controllerWindow showWindow:nil];
      [[controllerWindow window] makeMainWindow];
      }
  </code></pre>
  
  <p>so far I can see the window appearing by one second and then this just dissappear, how to do this correctly???</p>