Re: init a window
Re: init a window
- Subject: Re: init a window
- From: Charles Bennett <email@hidden>
- Date: Sat, 18 Aug 2001 11:53:00 -0400
If I understand what you are asking, you want the window to reset
every time it becomes visible..
For that, register some object for window event notifications
like NSWindowDidBecomeMain and reset there or, if you just order
the panel out, it might look better to do the reset on windowDidClose
or something like that so the user never sees the reset of the control happen..
I'm not looking at the doc's so the event names
may vary a little...
chuck
Farl wrote:
>
>
I have a utility panel that pops up when it is called by a menu.
>
>
In it i have a button that does a version control check. Once it has
>
checked the version, it resets to a "version checked" title and
>
setEnabled:NO. This all works fine.
>
>
However, every time that utility panel opens, i want it to reset that
>
title to "Check for Update" and setEnabled:YES.
>
>
I tried using awakeFromNib (this only worked once when the program
>
loaded) and i tried using init. I think i should be using init but i am
>
sure i am using it wrong.
>
>
Any help is appreciated.
>
>
//////
>
>
- init
>
{
>
[buttonVersion setTitle:@"Check for Update"];
>
[buttonVersion setEnabled:YES];
>
return self;
>
}
>
>
//////
>
>
Searle
>
email@hidden
>
www.sketchwork.com
>
>
IMPORTANT: This email is intended for the use of the individual addressee(s) named above and may contain information that is confidential, privileged or unsuitable for overly sensitive persons with low self-esteem, no sense of humour or irrational religious beliefs. If you are not the intended recipient, any dissemination, distribution or copying of this email is not authorised (either explicitly or implicitly) and constitutes an irritating social faux pas. Unless the word absquatulation has been used in its correct context somewhere other than in this warning, it does not have any legal or no grammatical use and may be ignored. No animals were harmed in the transmission of this email, although the kelpie next door is living on borrowed time, let me tell you. Those of you with an overwhelming fear of the unknown will be gratified to learn that there is no hidden message revealed by reading this warning backwards, so just ignore that Alert Notice from Microsoft. However, b!
y !
>
pouring a complete circle of salt around yourself and your computer you can ensure that no harm befalls you and your pets. If you have received this email in error, please add some nutmeg and egg whites, whisk and place in a warm oven for 40 minutes.
>
_______________________________________________
>
cocoa-dev mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
--
Windows, you ARE the weakest link... Good Bye!