Skip navigation.
 
mlRe: Window display problems
FROM : matt neuburg
DATE : Tue Jan 14 20:53:44 2003

On Tue, 14 Jan 2003 09:14:40 -0600, "Josh Ferguson" <<email_removed>> 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_removed>, 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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlWindow display problems Josh Ferguson Jan 14, 16:14
mlRe: Window display problems Stéphane Sudre Jan 14, 16:44
mlRE: Window display problems Josh Ferguson Jan 14, 16:52
mlRe: Window display problems matt neuburg Jan 14, 20:53