Author |
Message |
deep
|
Posted: Sat May 28, 2005 2:38 pm Post subject: closing a screen after exit |
|
|
how do u cloase the run window, after you exit the program? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
MysticVegeta
|
Posted: Sat May 28, 2005 2:49 pm Post subject: (No subject) |
|
|
first before you run the program, make a window
code: | var win := Window.Open("graphics:300;300") |
After you finish the code and where you want to exit, go something like this ->
code: | ...
exit
Window.Close(win)
|
|
|
|
|
|
|
deep
|
Posted: Sat May 28, 2005 3:42 pm Post subject: (No subject) |
|
|
it says that the last statement
Window.Close(win)
will not be executed |
|
|
|
|
|
Cervantes
|
Posted: Sat May 28, 2005 4:02 pm Post subject: (No subject) |
|
|
You need to exit your main loop and then close the window.
code: |
loop % (main)
%code
exit when condition
end loop
Window.Close (winID)
|
|
|
|
|
|
|
StarGateSG-1
|
Posted: Sat May 28, 2005 5:18 pm Post subject: (No subject) |
|
|
That is an ok method I find but is kinda messy, I prefer to make window invisble after the program ends. |
|
|
|
|
|
Cervantes
|
Posted: Sat May 28, 2005 5:25 pm Post subject: (No subject) |
|
|
How's that any better? Especially since the program is ending, you'd think you would want to close the window. |
|
|
|
|
|
MysticVegeta
|
Posted: Sat May 28, 2005 5:41 pm Post subject: (No subject) |
|
|
code: | Window.Close(Window.GetActive) |
This maybe |
|
|
|
|
|
MysticVegeta
|
Posted: Sat May 28, 2005 5:43 pm Post subject: (No subject) |
|
|
Cervantes wrote: then close the window.
I dont think that makes a difference, The loop can run even when the window is closed |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Cervantes
|
Posted: Sat May 28, 2005 6:34 pm Post subject: (No subject) |
|
|
MysticVegeta wrote: Cervantes wrote: then close the window.
I dont think that makes a difference, The loop can run even when the window is closed
I know. What are you talking about?
We're talking about once the main loop has been exitted and the program is finishing. Stargate said it's better to hide the window than close it, and I asked why. |
|
|
|
|
|
MysticVegeta
|
Posted: Sat May 28, 2005 6:42 pm Post subject: (No subject) |
|
|
I meant it could be
code: | Window.Close(win)
exit
|
|
|
|
|
|
|
Cervantes
|
Posted: Sat May 28, 2005 7:08 pm Post subject: (No subject) |
|
|
Oh, well, that would require an if statement. Sometimes you need to use the if statement, but often the less bulky exit when is capable. |
|
|
|
|
|
StarGateSG-1
|
Posted: Sun May 29, 2005 8:49 am Post subject: (No subject) |
|
|
I said you hide it after the program is finished, so say you have a GUI in there, you would put it after the GUI exit when process event. or after and exit when. Once the window is finished if you hide it. it will be gone for good, no it doesn't stack of finished files. It works better than havign to open the window then close it. |
|
|
|
|
|
Cervantes
|
Posted: Sun May 29, 2005 11:32 am Post subject: (No subject) |
|
|
StarGateSG-1 wrote:
It works better than havign to open the window then close it.
What's wrong with opening a window? There's not much you can do with the program if you don't!
It seems like closing a window would be better management then simply hiding it and letting it sit there forever and ever. |
|
|
|
|
|
MysticVegeta
|
|
|
|
|
axej
|
Posted: Sun May 29, 2005 12:46 pm Post subject: (No subject) |
|
|
Cervantes wrote: StarGateSG-1 wrote:
It works better than havign to open the window then close it.
What's wrong with opening a window? There's not much you can do with the program if you don't!
It seems like closing a window would be better management then simply hiding it and letting it sit there forever and ever.
its true since in turing if the program finishes, then there is nothing the user can do with the window anymore. |
|
|
|
|
|
|