Re: Window display problems
Re: Window display problems
- Subject: Re: Window display problems
- From: matt neuburg <email@hidden>
- Date: Tue, 14 Jan 2003 11:53:44 -0800
On Tue, 14 Jan 2003 09:14:40 -0600, "Josh Ferguson" <email@hidden> said:
>
I know there must be a simple solution to this, but I
>
haven't figured it out yet. I have a .nib file that will
>
be loaded as a sheet (it's a progress dialog). I
>
initialize the controller for this nib file when my main
>
controller finishes loading. The .nib file simply
>
consists of a window with an NSImageView, a progress
>
indicator, and two text fiels. My problem is that I want
>
to set the image for the NSImageView before the window is
>
displayed, but it seems that the NSImageView isn't
>
initialized until the window is displayed for the first
>
time
No, I think you want to say that the NSImageView isn't initialized until the window is *loaded* for the first time. But that's not the same, since nothing requires that you then immediately *show* the window. Remember, initializing the window controller does NOT load the window. To load the window, you must say "window" to the window controller. For example:
[theWindowController window];
Or, inside the window controller's own code:
[self window];
Now the window is loaded and you can proceed to modify it. By the way, your window controller will get a windowDidLoad call at this time so that's one place to perform your gui initializations. m.
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.