Le 20 août 2009 à 01:13, I. Savant a écrit :

On Aug 19, 2009, at 6:49 PM, Jean-Daniel Dupas wrote:

You're probably calling setImage: before the nib is loaded (and so the outlet is connected). You can force it to load by calling [aWindowController window] before trying to set the image.

The standard practice is to start any nib-dependent startup stuff on -awakeFromNib ... forcing it to load seems dirty. :-)

 Does anybody know of the implications of this?


The -[NSWindowController loadWindow] methods says you can call - [NSWindowController window] to load the window, so I don't think it should be an issue..

Just a point, I think that in NSWindowController it may be better to initialize dependent stuff in -windowDidLoad, especially if you want to access the window object. I remember I encountered some issue using awakeFromNib some time ago but don't remember exactly what it was.


_______________________________________________

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