title: Load custom viewcontroller from xib
body: <p>Hello I have an OS X application with multiple windows and views. 
  Now i wanted to refactor some code and tried to load my custom viewcontroller through my generated xib file with follong method:</p>
  
  <pre><code>TestViewController* tableViewController =
  [[TestViewController alloc] initWithNibName:@"TestView" bundle:nil];
  </code></pre>
  
  <p>TestViewController is a subclass of NSViewController. At this point everything is fine, (i hope) because i see no exception. </p>
  
  <p>To get a bit more understanding of my code, here is the part that throws the error:</p>
  
  <pre><code>        if (tableViewController != nil)
          {
              myCurrentViewController = tableViewController;
              [myCurrentViewController setTitle:@"TestView"];
          }
  
          [[self window] setContentSize:[smallView frame].size];
          [[[self window] contentView] addSubview:[myCurrentViewController view]]; //here is the error
  </code></pre>
  
  <p>I already tried things like check for files owner, main interface is MainMenu ...</p>