Computer Science Canada

Turing Button Assist

Author:  SpectralCrown [ Thu Apr 11, 2013 4:09 pm ]
Post subject:  Turing Button Assist

What is it you are trying to achieve?
I am trying to make severals buttons in a program


What is the problem you are having?
When the program gets to the screen with the buttons, the program finishes and I can't click on the buttons. Each button initiates a procedure but will not let me click them


Describe what you have tried to solve this problem
I have tried to create procedures for each button and execute them along side the screen that displays the buttons


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
http://pastebin.com/5ymBQSqQ

Turing:





Please specify what version of Turing you are using
Turing 4.1.1

Author:  TW iz Rippin [ Thu Apr 11, 2013 5:23 pm ]
Post subject:  RE:Turing Button Assist

Your buttons are missing something. Read this: http://compsci.ca/v3/viewtopic.php?t=3583

And see if you can find out where you went wrong.

Author:  SpectralCrown [ Thu Apr 11, 2013 5:32 pm ]
Post subject:  Re: RE:Turing Button Assist

TW iz Rippin @ Thu Apr 11, 2013 5:23 pm wrote:
Your buttons are missing something. Read this: http://compsci.ca/v3/viewtopic.php?t=3583

And see if you can find out where you went wrong.


Declaring the variables for the buttons? I already have them, I seem to have forgotten to put them on the pastebin thing, but they are already variables...

Author:  Clayton [ Fri Apr 12, 2013 8:10 am ]
Post subject:  RE:Turing Button Assist

You've created your buttons, but how does the computer know that it should wait for input? As far as it's concerned, just by creating the buttons it's done it's job. You've only got that code running once.

Author:  SpectralCrown [ Sat Apr 13, 2013 12:10 pm ]
Post subject:  Re: Turing Button Assist

Ok, I got it running all fine and dandy, but this time, i'm using more body procedures, and in a body procedure after the buttons are created, I put GUI.Dispose (button name), but when i run the program it says that (button name) has not been declared even though right before the GUI.Dispose is a body procedure for each button getting created.

Author:  Nathan4102 [ Sat Apr 13, 2013 12:18 pm ]
Post subject:  RE:Turing Button Assist

Can you post your code in appropriate tags?

Author:  SpectralCrown [ Sat Apr 13, 2013 12:25 pm ]
Post subject:  Re: Turing Button Assist

http://pastebin.com/D5nDD5PB

Author:  TW iz Rippin [ Tue Apr 16, 2013 10:35 am ]
Post subject:  RE:Turing Button Assist

you need something in your code to wait for a button to be pressed before it finishes, otherwise it will print the buttons then end the program. Refer to the link I posted earlier.


: