Computer Science Canada Dispose GUI |
Author: | nflavour [ 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? |
Author: | corriep [ Sat Jan 10, 2009 1:11 pm ] |
Post subject: | RE:Dispose GUI |
Help menu (F10) |
Author: | nflavour [ 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.. |
Author: | corriep [ 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 |
Author: | Tony [ 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. |
Author: | nflavour [ 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? |
Author: | Tony [ 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. |
Author: | nflavour [ 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. |
Author: | Tony [ Sun Jan 11, 2009 3:44 pm ] |
Post subject: | 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. |
Author: | nflavour [ 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! |
Author: | Tony [ Sun Jan 11, 2009 5:16 pm ] |
Post subject: | RE:Dispose GUI |
In Turing, the easiest way would be to use a flexible array |
Author: | nflavour [ 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 |