Re: devil of a time with an NSImageView
Re: devil of a time with an NSImageView
- Subject: Re: devil of a time with an NSImageView
- From: Jean-Daniel Dupas <email@hidden>
- Date: Thu, 20 Aug 2009 09:41:41 +0200
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 (email@hidden)
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:
This email sent to email@hidden