tags:

views:

80

answers:

1

I have a Cocoa Application that uses a main default window, and another window nib I created. When the program starts, I want it to load the window nib and show it in front of the default 'MainMenu' nib window. How can I do this? I've tried the following code, but the window is still displayed behind the default window:

InfoWindowController *winInfo = [InfoWindowController new];

[winInfo.window makeKeyAndOrderFront:self];
[winInfo.window setOrderedIndex:0];
[winInfo.window makeKeyAndOrderFront:self];
[winInfo showWindow:self];

This is being called from AppController, which is a class I added to the MainMenu nib. InfoWindowController subclasses NSWindowController.

A: 

Sorry I just created an account so now I can edit my posts to include other details requested. I think the easiest way see what I'm doing wrong is to see an example project:

http://dl.dropbox.com/u/7195844/WindowExample.zip

CoderJoe