On Sep 4, 2009, at 11:18 AM, Michael A. Crawford wrote:

-[[NSApplication sharedApplication] mainWindow] returns nil!

-mainWindow returns the frontmost visible document window. It will never return a hidden window.

So, when I call -[window makeKeyAndOrderFront] I'm doing so with a nil object. I don't know how to make my main window visible.

Declare an instance variable for it, and wire that up in the nib to point to the window. Then just call [myWindow makeKeyAndOrderFront: self].

—Jens

_______________________________________________

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