Dispose GUI
Author |
Message |
nflavour
|
Posted: Sat Jan 10, 2009 1:00 pm Post subject: 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? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
corriep
|
Posted: Sat Jan 10, 2009 1:11 pm Post subject: RE:Dispose GUI |
|
|
Help menu (F10) |
|
|
|
|
![](images/spacer.gif) |
nflavour
|
Posted: Sat Jan 10, 2009 1:19 pm Post subject: Re: RE:Dispose GUI |
|
|
corriep @ Sat Jan 10, 2009 1:11 pm wrote: 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.. |
|
|
|
|
![](images/spacer.gif) |
corriep
|
Posted: Sat Jan 10, 2009 1:26 pm Post subject: RE:Dispose GUI |
|
|
Im pretty sure there's no way to delete them all, you have to dispose each one individually |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Sat Jan 10, 2009 3:44 pm Post subject: Re: Dispose GUI |
|
|
nflavour @ Sat Jan 10, 2009 1:00 pm wrote:
is there a way to dispose all the GUI in the program at once?
if you no loner want GUI
should do the trick. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
nflavour
|
Posted: Sat Jan 10, 2009 4:34 pm Post subject: Re: Dispose GUI |
|
|
Tony @ Sat Jan 10, 2009 3:44 pm wrote: nflavour @ Sat Jan 10, 2009 1:00 pm wrote:
is there a way to dispose all the GUI in the program at once?
if you no loner want GUI
should do the trick.
Do you mean If I do GUI.Quit, i can't use GUI in rest of my program? |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Sun Jan 11, 2009 12:19 am Post subject: 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. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
nflavour
|
Posted: Sun Jan 11, 2009 10:30 am Post subject: Re: RE:Dispose GUI |
|
|
Tony @ Sun Jan 11, 2009 12:19 am wrote: 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. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
|
|
|
![](images/spacer.gif) |
nflavour
|
Posted: Sun Jan 11, 2009 4:55 pm Post subject: Re: RE:Dispose GUI |
|
|
Tony @ Sun Jan 11, 2009 3:44 pm wrote: 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! |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Sun Jan 11, 2009 5:16 pm Post subject: RE:Dispose GUI |
|
|
In Turing, the easiest way would be to use a flexible array |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
nflavour
|
Posted: Sun Jan 11, 2009 6:40 pm Post subject: Re: RE:Dispose GUI |
|
|
Tony @ Sun Jan 11, 2009 5:16 pm wrote: 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 |
|
|
|
|
![](images/spacer.gif) |
|
|