GUI buttons with multiple choise questions
Author |
Message |
animeanime
|
Posted: Tue Jun 02, 2009 9:48 am Post subject: GUI buttons with multiple choise questions |
|
|
What is it you are trying to achieve?
Make the GUI buttons work with my multiple choise questions
What is the problem you are having?
Don know how to use it, I have tried different ways and it dident work. I spent over 30min and no luck.
Describe what you have tried to solve this problem
Tried using different GUI's and searching in the forums, still cant find a solution.
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
This is working. I want each of my questions to be something like this. So I click on a, b, c, or d and it goes to the next question.
Turing: |
import GUI
procedure DoNothing (status : boolean)
end DoNothing
View.Set ("graphics:300;100,nobuttonbar")
put "What is the last planet in the solor system"
var cb1 : int := GUI.CreateCheckBox (10, 10, "Check Box 1",
DoNothing )
var cb2 : int := GUI.CreateCheckBoxFull (200, 10, "Check Box 2",
DoNothing, GUI.RIGHT, '2')
GUI.SetCheckBox (cb2, true)
var quitBtn : int := GUI.CreateButton (230, 10, 0, "Go", GUI.Quit)
loop
exit when GUI.ProcessEvent
end loop
var cb1Status : boolean := GUI.GetCheckBox (cb1 )
var cb2Status : boolean := GUI.GetCheckBox (cb2 )
if cb1Status then
put "Check box 1: filled"
else
put "Check box 1: empty"
end if
if cb2Status then
put "Check box 2: filled"
else
put "Check box 2: empty"
end if
|
This is 1 question from my program
Turing: | put "Question Number #1"
put "What is the last planet in the solor system"
put "a) Venus"
put "b) Neptune"
put "c) Mars"
put "d) Jupiter"
get answer
if answer = 'b'
then
point := point + 1
else
point := point + 0
end if |
Please specify what version of Turing you are using
4.0.3 |
|
|
|
|
|
Sponsor Sponsor
|
|
|
tjmoore1993
|
Posted: Tue Jun 02, 2009 1:32 pm Post subject: RE:GUI buttons with multiple choise questions |
|
|
I know this is not for personal purposes because your in my class, so may I suggest using the Holtsoft's document here at Compsci?
http://compsci.ca/holtsoft/doc
It has information for all the commands, operands, etcetera... Enjoy, also I hope your questions are more harder then that? |
|
|
|
|
|
animeanime
|
Posted: Wed Jun 03, 2009 8:20 am Post subject: RE:GUI buttons with multiple choise questions |
|
|
That is what I used. I cant figure that out. I dont understand how to use it. And its confusing. |
|
|
|
|
|
|
|