Windows
Author |
Message |
uberwalla

|
Posted: Sun Apr 08, 2007 12:51 pm Post subject: Windows |
|
|
Hey there. i got a quick question about the Window. commands.
ok so if I have the main window open which i called Console. i opened it at the start using console:= Window.Open ("...")
then later in my code i have a button that opens/closes a window but when you close the program using and window "console" it doesnt close the other window. I tried using Window.Close (tagBAR) [which is the other window] along with the one for the console window when the program ends. but if the tagBAR window isnt open it gets an error, if it is theres no error and it closes. i was wondering if there is a way to check for a window using some sort of thing like if blah = true? i tried it that way and it didnt work but maybe someone else can help?
basically what i need is some sort of way to check for a window, and IF it is open then it closes and if not then nothing happens (being no error). the only thing that will happen is the main window closing if there is no other window.
thanks ahead. |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Clayton

|
Posted: Sun Apr 08, 2007 1:30 pm Post subject: RE:Windows |
|
|
why not use the default window? you're overcomplicating things by open two windows manually. For future reference, the window ID for the default window is (surprisingly) defWinID. |
|
|
|
|
 |
uberwalla

|
Posted: Sun Apr 08, 2007 1:55 pm Post subject: Re: Windows |
|
|
ok thank you, but that still does not really answer my question.
so if i decide to close the default window in the end thats good thats what i need. but i added a function into my program which opens/closes another window making a mini toolbar. what i need to happen is that if i have the second window open, is there a way to actually have the program check to see if the window is open?
here is a example i'm thinking of.
Senario #1
you start the program. and then exit it. as it exited, it checked to see if the second window was open. it wasnt it ended the program closing the main window only.
Senario #2
you start the program and open the second window. you exit the program. as it exits it checks to see if there the second window is open. it is. it closes that window and the main window.
Basically what i am trying to demonstrate is that i had a line of code that closed the first window and the second wether the second was open or not. which when it wasnt it brought up the error variable has no value for window 2 i want it to check for the windows so it closes both if there is and so theres no error if there isnt the two of them. |
|
|
|
|
 |
|
|