Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 closing a screen after exit
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
deep




PostPosted: 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
Sponsor
sponsor
MysticVegeta




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: Sat May 28, 2005 5:41 pm   Post subject: (No subject)

code:
Window.Close(Window.GetActive)


This maybe Confused
MysticVegeta




PostPosted: 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
Sponsor
sponsor
Cervantes




PostPosted: 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? Eh
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




PostPosted: Sat May 28, 2005 6:42 pm   Post subject: (No subject)

I meant it could be
code:
Window.Close(win)
exit
Cervantes




PostPosted: 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




PostPosted: 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




PostPosted: 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.

Laughing 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




PostPosted: Sun May 29, 2005 12:10 pm   Post subject: (No subject)

Cervantes wrote:
sit there forever and ever.

eh? thats funny! Laughing Laughing Laughing Laughing
axej




PostPosted: 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.

Laughing 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 18 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: