I am trying to accomplish the very simple task of opening a new window, but I seem to be completely unable to do so.
I am using MonoMac with monobjc on a Mac. When creating a new monobjc project, a MainMenu.xib is created. I have managed to add controls and binding to this file using the XCode editor. This window is automatically opened when the application is launched.
When I attempt to create a new window, however, I can't make it show up at all. I created a .xib file by right clicking the parent folder of MainMenu.xib, and clicking Add file => Cocoa Window Template. This file can be edited in XCode just a MainMenu.xib.
I then proceeded to create a class inheriting NSWindowController, and I chose this class as the "File's owner" of the window in my .xib file. I have then been able to design the window, and to add outlets and actions to the controller.
But I can't figure out how to open the window. I have tried multiple variations of this:
var f = new RegularLoginForm(); //which inherits NSWindowController
f.LoadWindow(); //I have tried without this line
f.ShowWindow(null); // I have also tried sending in the AppDelegate object (which is the controller for MainMenu.xib)
But nothing seems to work -- that is, the window never opens. Any suggestions?
EDIT: Here's a screenshot of how my .xib and it's configuration looks: https://dl.dropbox.com/u/1545094/so_nswindowcontroller.png