Re: Right way to load initial data in controls when opening a window
Re: Right way to load initial data in controls when opening a window
- Subject: Re: Right way to load initial data in controls when opening a window
- From: Steve Woodward <email@hidden>
- Date: Wed, 2 Apr 2003 07:42:20 -0500
That works great except for the first time the window is opened...I
guess I could use awakeFromNib for the initial opening of the window,
except for one glitch: I am passing a value (a dictionary) to the
window controller and using key-value pairs to load the edit fields.
Since the edit fields aren't available yet during awakeFromNib I can't
load them up yet. I seem to need something like
"afterBeingAwakenFromNib"?
Perhaps a broad overview of what I am trying to do is in order: I have
a window with a table view loaded up with data. I want to have the user
be able to double click that table and have a new window open with the
data from the selected row loaded up in edit fields. Using Jan's
suggestion I have it working except for the initial opening of the
window.
Many thanks for the tips and for any other advice!
Steve W
On Tuesday, April 1, 2003, at 10:58 PM, Jan Van Tol wrote:
You could probably override showWindow: in your NSWindowController
subclass.
- (void)showWindow:(id)sender {
// Set values here.
[super showWindow:sender];
}
-Jan Van Tol
On Tuesday, April 1, 2003, at 04:53 PM, Steve Woodward wrote:
Let's say you open a window and want to fill in some of the controls
with values (the window is in a separate nib). I create an instance
of the new window's controller and load the nib. I use an init method
to load up the data in the fields. But if the user closes the window
then reopens it it still has the old values...I'm assuming that's
because the window is not being released when it's closed, it's just
being hidden. What is the proper method to insure that I can load up
the values whether it's on the initial opening of the window or
subsequent "unhiding"? Thanks in advance for any tips.
Steve W
_______________________________________________
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.
_______________________________________________
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.