title: View Controller calls awakeFromNib twice
body: <p>I'm facing this strange problem and I'm not sure where I'm going wrong.</p>
  
  <p>Situation:</p>
  
  <p>I have a MainWindowController class which will load the correct nibs to be displayed.
  I created an object and changed it to MainWindowController class in the IB and put it with  "MainWindowView" nib.</p>
  
  <p>So basically the nib "MainWindowView" has the custom view and a few buttons on the side so that the user can select which view to load and it will load the other respective nib. I've hidden the mainmenu during launch in the IB so it only loads the MainWindowView with the other nib files.</p>
  
  <p>While debugging however, when I put a NSLog on MainWindowController's awakeFromNib, I saw that in the console it was being called twice.</p>
  
  <p>in my project, I have a startupController class together with MainMenu.xib with the following code.</p>
  
  <p>startUpController.h:</p>
  
  <pre><code>#import &lt;Cocoa/Cocoa.h&gt;
  #import "MainWindowController.h"
  
  @interface startupController : NSObject {
   MainWindowController *myWindowController;
  }
  @end
  </code></pre>
  
  <p>startUpController.m:</p>
  
  <pre><code>#import "startupController.h"
  @implementation startupController
  -(void)awakeFromNib {
   [super init];
   if(myWindowController == nil)
   myWindowController = [[MainWindowController alloc] initWithWindowNibName:@"MainWindowView"];
   [myWindowController showWindow:self];
  }
  @end
  </code></pre>
  
  <p>any help is appreciated. thanks.</p>