
-----------------------------------
nflavour
Sat Jan 10, 2009 1:00 pm

Dispose GUI
-----------------------------------
What are all the GUI command to stop/disable/close a GUI?
And, is there a way to dispose all the GUI in the program at once?

-----------------------------------
corriep
Sat Jan 10, 2009 1:11 pm

RE:Dispose GUI
-----------------------------------
Help menu (F10)

-----------------------------------
nflavour
Sat Jan 10, 2009 1:19 pm

Re: RE:Dispose GUI
-----------------------------------
Help menu (F10)
I did search up before i posted. I found GUI.Dispose,GUI.Disable,GUI.Hide, but are there more? and is there a way to Dispose them all? I didn't find the answer to this..

-----------------------------------
corriep
Sat Jan 10, 2009 1:26 pm

RE:Dispose GUI
-----------------------------------
Im pretty sure there's no way to delete them all, you have to dispose each one individually

-----------------------------------
Tony
Sat Jan 10, 2009 3:44 pm

Re: Dispose GUI
-----------------------------------

is there a way to dispose all the GUI in the program at once?
if you no loner want GUI

GUI.Quit
cls

should do the trick.

-----------------------------------
nflavour
Sat Jan 10, 2009 4:34 pm

Re: Dispose GUI
-----------------------------------

is there a way to dispose all the GUI in the program at once?
if you no loner want GUI

GUI.Quit
cls

should do the trick.
Do you mean If I do GUI.Quit, i can't use GUI in rest of my program?

-----------------------------------
Tony
Sun Jan 11, 2009 12:19 am

RE:Dispose GUI
-----------------------------------
That's right.

The alternative is that you create a stack to keep a list of currently active elements, and a special function that will create the GUI element, place a reference to it on the stack, and return the element as if it was the original GUI.Create_whatever. It's a wrapper of sorts, but then you can trivially Dispose the entire stack full of elements.

-----------------------------------
nflavour
Sun Jan 11, 2009 10:30 am

Re: RE:Dispose GUI
-----------------------------------
That's right.

The alternative is that you create a stack to keep a list of currently active elements, and a special function that will create the GUI element, place a reference to it on the stack, and return the element as if it was the original GUI.Create_whatever. It's a wrapper of sorts, but then you can trivially Dispose the entire stack full of elements.
I didn't 100% understand that, but this is what i got. You mean? I create a function to create GUIs and treat it as an original redefined GUI. But I don't understand the stack part.
Also, the Buttons I need to create are completely based on the users' input, and action before. So, i don't know which button or textfield to dispose when I need to dispose them. I can create a button for EVERY Possibility but that will take a long time, as i came up with about 130.

-----------------------------------
Tony
Sun Jan 11, 2009 3:44 pm

RE:Dispose GUI
-----------------------------------
stacks -- http://en.wikipedia.org/wiki/Stack_(data_structure)

It sounds like you just need some sort of a data structure to keep track of what's on the screen and what the user might want to get rid of.

-----------------------------------
nflavour
Sun Jan 11, 2009 4:55 pm

Re: RE:Dispose GUI
-----------------------------------
stacks -- http://en.wikipedia.org/wiki/Stack_(data_structure)

It sounds like you just need some sort of a data structure to keep track of what's on the screen and what the user might want to get rid of.
Yes, this is exactly what I need, but after some reading (on wikipedia, and on Turing Reference) I think, Stack is just a way of knowing which is first and which is last. But, I have no idea how to operate and use "stack" in Turing. I try to search it in the tutorial and help section, and didn't get useful (at least that's what i think) result. Could you, Tony, or anyone, tell me a way, or ways to create and use stack? Thanks!

-----------------------------------
Tony
Sun Jan 11, 2009 5:16 pm

RE:Dispose GUI
-----------------------------------
In Turing, the easiest way would be to use a flexible array

-----------------------------------
nflavour
Sun Jan 11, 2009 6:40 pm

Re: RE:Dispose GUI
-----------------------------------
In Turing, the easiest way would be to use a flexible array
Thanks, Tony! took me awhile to get flexible array, and it's all thanks to Cervantes with the flexible array tut. http://compsci.ca/v3/viewtopic.php?t=6723&highlight=flexible+array
