On Mar 3, 2010, at 3:00 PM, fabian wrote:

Thanks for your replies. I understand that the -frame message is returning
garbage. What I don't understand is why statusBar, statusItem or the
statusItem's view is nil during (but not after) the unarchiving of the nib,
or (on 10.5.8) even shortly after NSApp is fully loaded. Or is it?

By the time -applicationDidFinishLaunching is called, everything should be up and running. During -awakeFromNib (of the main nib), things are iffier. You know that your outlets have been initialized, but you don't know that every other object's -awakeFromNib method has run yet.

It's definitely related to the app/nib not being up and ready to go.
I'm displaying a dialog on first run in awakeFromNib. When the dialog


Putting up a dialog from within an -awakeFromNib method is a really, really, bad idea. (If it's a modal dialog, add three or four more "really"s.) You should either do the check later, or a delayed-perform so the dialog is only displayed after the app is initialized.

—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