
-----------------------------------
greenapplesodaex
Tue Jun 08, 2004 12:46 pm

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?

-----------------------------------
Neja
Tue Jun 08, 2004 1:04 pm


-----------------------------------
Try opening a Window at the beging of your program and when you quit the game, close the window.

-----------------------------------
greenapplesodaex
Tue Jun 08, 2004 1:19 pm

reply
-----------------------------------
o, haha, my program is mulitiple windows, but you cant close the default window

-----------------------------------
Neja
Tue Jun 08, 2004 1:33 pm


-----------------------------------
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
Tue Jun 08, 2004 2:52 pm


-----------------------------------
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:
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
Tue Jun 08, 2004 3:45 pm

reply
-----------------------------------
um... if you compile it, and do the quit thing, it gives you an error

-----------------------------------
AsianSensation
Tue Jun 08, 2004 3:55 pm


-----------------------------------
return instead of quit

-----------------------------------
greenapplesodaex
Tue Jun 08, 2004 6:01 pm

reply
-----------------------------------
you da man!
