Computer Science Canada Making a reset button work proplerly |
Author: | Bobby321 [ Tue Jan 17, 2012 1:09 pm ] | ||
Post subject: | Making a reset button work proplerly | ||
What is it you are trying to achieve? <Replace all the <> with your answers/code and remove the <>> Making a thermometer that changes temperature from Fahrenheit to Celsius and repeats. What is the problem you are having? The program repeats by clicking the orange button and most of the time it works but sometimes it takes many clicks to reset it. I need help to make it repeat with only 1 click every time. Describe what you have tried to solve this problem Try making a GUI button, but still no help. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here>
Please specify what version of Turing you are using 4.1.1 |
Author: | mirhagk [ Tue Jan 17, 2012 1:16 pm ] |
Post subject: | RE:Making a reset button work proplerly |
well what you need to do is restructure your program.remove the loop from inside the function, as well as the mouse detection code, and put it outside. That way it gets drawn once, and then constantly checks if you press the button, and if so it calls the function again. |