Question: I have created the tabview cocoa application and having xib file name "MainMenu.xib". also inserted a button in MainMenu.xib file. And now I created a window having xib filename(testwindow.xib). Now I want to when I clicked on button then the testwindow should be popup. I have tried like
In **Appdelegate.mm**

```
-(IBAction)hellobtn:(id)sender
{
NSWindowController *hellocontroller = [[NSWindowController alloc] initWithWindowNibName:@"testwindow.xib"];
[hellocontroller showWindow:self];
NSLog(@"Windows=%@", [hellocontroller window]);

```

The code is compiled success. But when I clicked on button the following error generated in output windows:

```
[NSWindowController loadWindow]: failed to load window nib file 'testwindow.xib'.
windows(null) //NSLog output

```

Can any one please tell me how to launch the another window from **appdelegate.mm** file. 

Thanks,

Answer: 
When you load nib you should NOT put extension in the name.

Like so:

```
NSWindowController *hellocontroller = [[NSWindowController alloc] initWithWindowNibName:@"testwindow"];

```
fixed,

I have defined the NSWindowController \*hellocontroller; below implementation of main class;

and then on button action I wrote :

```
hellocontroller = [[NSWindowController alloc] initWithWindowNibName:@"testwindow"];
[hellocontroller showWindow:self]; //optional, without this line, it is also running.

```