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: Ian Gillespie <email@hidden>
- Date: Wed, 2 Apr 2003 17:27:45 -0800
If you make your class the delegate of the window (wire it up in IB),
then you can have your class respond to windowWillClose:(NSNotification
*)notif
I think if you do your set up of the window controls in awakeFromNib
then you might be OK also?
~Ian
On Tuesday, Apr 1, 2003, at 22:00 US/Pacific,
email@hidden wrote:
Message: 9
Date: Tue, 1 Apr 2003 19:08:30 -0800
Subject: Re: Right way to load initial data in controls when opening a
window
Cc: email@hidden
To: Steve Woodward <email@hidden>
From: Dustin Voss <email@hidden>
On Tuesday, April 1, 2003, at 02: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.
I'm curious about this myself. "windowWillBecomeMain:" is no good,
because it will get called if the user momentarily selects another
window. I can't use "isVisible" to check whether the window is
currently closed or not, because minimized windows also show up as
invisible. I can't tell whether a window has been ordered out, because
there's no accessor for that. There aren't any notifications when a
window is ordered out, either.
_______________________________________________
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.