title: NSBundle loading a NSViewController
body: <p>I'm looking into a project that would upload custom NSBundles that include a NSViewController. In my main program I've got this code to deal with the bundle after it's been loaded...</p>
  
  <pre><code>id principalClass = [loadedBundle principalClass];
  id instance = [[principalClass alloc] init];
  [localLabel setStringValue:[instance name]];
  NSView *incomingView = [[instance viewController] view];
  [localView addSubview:incomingView];
  [localView display];
  </code></pre>
  
  <p>And the principal classes init method in the bundle looks like this...</p>
  
  <pre><code>-(id) init {
      if(self = [super init]){
          name = @"My Plugin";
          viewController = [[ViewController alloc] initWithNibName:@"View" bundle:nil];
      }
      return self;
  }
  </code></pre>
  
  <p>View.nib is a nib located in the bundles project. But whenever I load the bundle I get this error...</p>
  
  <p>2010-05-27 09:11:18.423 PluginLoader[45032:a0f] unable to find nib named: View in bundle path: (null)
  2010-05-27 09:11:18.424 PluginLoader[45032:a0f] -[NSViewController loadView] could not load the "View" nib.</p>
  
  <p>I know I've got everything wired up because the line <code>[label setStringValue:[instance name]];</code> sets the label text correctly. Plus, if I take all of the clases in the bundle and load them into my main applications project everything works as expect. Any thoughts on how I can correctly reference "View" in my bundle?</p>
  
  <p>Thanks!</p>