Re: Cannot get toolbar to appear in window
Re: Cannot get toolbar to appear in window
- Subject: Re: Cannot get toolbar to appear in window
- From: Andy Lee <email@hidden>
- Date: Thu, 26 Apr 2007 15:18:31 -0400
On Apr 26, 2007, at 2:41 PM, email@hidden wrote:
for awakeFromNib: "An awakeFromNib message is sent to each object
loaded from the archive, but only if it can respond to
the message, and only after all the objects in the archive have
been loaded and initialized"
As I. Savant just pointed out: it's not whether the objects have been
instantiated and connected with each other. It's whether it's too
soon for [NSApp mainWindow] to return what you think it does. You
can check this with an NSLog that prints the value of [NSApp
mainWindow] just before you send -setToolbar:.
Offhand it doesn't seem like you should use -mainWindow for this kind
of messaging anyway. "Main window" has a specific meaning in Cocoa
which may not be what you think it is.
--Andy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden