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

Username:   Password: 
 RegisterRegister   
 how do i exit the program?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
greenapplesodaex




PostPosted: Tue Jun 08, 2004 12:46 pm   Post subject: how do i exit the program?

i'm making this program where if you click "exit" button, it shuts doesn the program. someone told me to use "quit", it works, but then it gives me some kinda of error. does anyone know the commend for shuting down a program?
Sponsor
Sponsor
Sponsor
sponsor
Neja




PostPosted: Tue Jun 08, 2004 1:04 pm   Post subject: (No subject)

Try opening a Window at the beging of your program and when you quit the game, close the window.
greenapplesodaex




PostPosted: Tue Jun 08, 2004 1:19 pm   Post subject: reply

o, haha, my program is mulitiple windows, but you cant close the default window
Neja




PostPosted: Tue Jun 08, 2004 1:33 pm   Post subject: (No subject)

Okay, well, then open the default (I'm doing this), or, I don't recomend it but, use GUI, OR, if you use quit, make an if statement which checks for the error and then choose whatever action,. I hope that made snese...
Cervantes




PostPosted: Tue Jun 08, 2004 2:52 pm   Post subject: (No subject)

i don't think it gives you an error exactly, it just highlights the quit line because that's where the program stopped.

to close the default window, you have to use a Window.Open at the start

you can do it like this:
code:
var winID := Window.Open ("graphics:500;500,title:Window Closing,nobuttonbar")
var keys : array char of boolean

loop
    Input.KeyDown (keys)
    exit when keys (KEY_ESC)
end loop
Window.Close (winID)
greenapplesodaex




PostPosted: Tue Jun 08, 2004 3:45 pm   Post subject: reply

um... if you compile it, and do the quit thing, it gives you an error
AsianSensation




PostPosted: Tue Jun 08, 2004 3:55 pm   Post subject: (No subject)

return instead of quit
greenapplesodaex




PostPosted: Tue Jun 08, 2004 6:01 pm   Post subject: reply

you da man!
Sponsor
Sponsor
Sponsor
sponsor
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 1  [ 8 Posts ]
Jump to:   


Style:  
Search: