On 2009.04.13, at 05:40, Quincey Morris wrote:

It's not wrong at all. Separate nibs are the recommended way of doing this.

You may just need to tell your window controller to display its window. Trying adding:

        [myWindowController showWindow: nil];

after you've initialized your window controller.

Incidentally, in a non-document-based application (as your appears to be), a good place to put code to create your window controller would be in your application delegate's applicationDidFinishLaunching: method. You say you created a window controller. Where *did* you put that code?

Well I did a subclass of NSWindowController in separate file MainWindowController.

But I actually don't understand those application delegate's concept.
How do I make something to delegate to something else (did I even get that right ?) ?

Application delegate would be (in my case) an object added in MainMenu.nib that would have MainWindowController class set to it ? And MainWindow.nib File's Owner is also set to MainWindowController, right ? That would be the connection between MainWindow.nib file and the code to instantiate my window controller.
I'm not sure I doing it right !

So I should put applicationDidFinishLaunching (that would be instance ?) method in MainWindowController class and inside instantiate my window controller ?

Thanks for answering !

Mario _______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to