timing of showing a window and setting display attributes of controls on that window
timing of showing a window and setting display attributes of controls on that window
- Subject: timing of showing a window and setting display attributes of controls on that window
- From: Stuart Malin <email@hidden>
- Date: Tue, 3 Jun 2008 14:06:43 -1000
I have a window with a few NSTextFields. The window has a controller
(sub class of NSWindowController). The window is loaded from a Nib.
I set the stringValue of the NSTextFields using the -setStringValue.
I tried doing this before showing the window:[super showWindow:self];
I moved the -showWindow to before I set the values; the values now
display.
1. Why doesn't this work when -showWindow is invoked after setting
the control's display values? Is the window not fully "alive" (in
some sense) after the Nib is loaded but before it is first shown?
2. I am doing what I do because I want the window to appear with the
display values set. Do I not need to worry about the order of the -
showWindow invocation -- that is, is the window displayed immediately
upon execution of the -showWindow, or on the next iteration of the
run loop (hence, my method calls to set the values of the controls
occur before the window is displayed)?
Thanks in advance for replies that advance my understanding.
_______________________________________________
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