title: After localization: Unable to find nib named ... in bundle path: (null)
body: <p>I'm starting to get into Mac OS X development and I have a problem the solution to which I haven't been able to figure out for the last three hours (I've googled a long time).</p>
  
  <p><strong>Test application:</strong><br>
  I have an application that has a <code>MainMenu.xib</code>, which displays a window - so far so good. I've created another XIB and <code>NSViewController</code> subclass that contains a view which I want to display within the main window. I use the following code to load the view and insert it into the main window:</p>
  
  <pre><code>- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
  {
      // Insert code here to initialize your application
      self.compartmentViewController = [[SelectCompartmentViewController alloc] initWithNibName:@"SelectCompartmentViewController" bundle:nil];
      [self.compartmentViewController.view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
      [self.compartmentViewController.view setFrame:[self.contentArea bounds]];              
  }
  </code></pre>
  
  <p><code>compartmentViewController</code> is a property and <code>self.contentArea</code> is a custom view on the main window - like a placeholder.</p>
  
  <p>This works fine so far.</p>
  
  <p><strong>Problem</strong><br>
  Then I decided to check out the localization feature. I've localized a couple of strings and both XIBs. At first I was a bit confused by not seeing any localized values. That was until I found out I had to clean the project - since then I've been getting the following error when running:</p>
  
  <blockquote>
    <p>2013-03-19 22:48:59.763 Vocab Box[10160:303] unable to find nib named: SelectCompartmentViewController in bundle path: (null)<br>
    2013-03-19 22:48:59.764 Vocab Box[10160:303] -[NSViewController loadView] could not load the "SelectCompartmentViewController" nib.</p>
  </blockquote>
  
  <p><strong>Suggested solutions I've tried to no avail</strong>  </p>
  
  <ol>
  <li>Cleaning the project doesn't help</li>
  <li>Checking the build configuration - yes, the bundle resources seem to be ok</li>
  <li>Yes, if I remove the localization for my subview and re-add the original XIB, things are fine again (though of course the view is not localized)</li>
  </ol>
  
  <p><em>Help</em></p>