benbock at msn.com
Fri Feb 3 20:01:00 EST 2006
I am going to make a standalone, that saves to a separate data stack. Right now I have 2 sample stacks to work out the kinks, "button sample" and "data sample". On the "button sample" stack I have a series of quiz items per card, each with yes or no responses. I used radio buttons, grouped for each item.
So item #1 has a "YES" btn and a "NO" btn, named "yes1" and "no1", & these are grouped to make "group1".
At the bottom of the page is a btn "Go Next Page", with the script:
put the value of hilitedbutton of group "group1" into field "1" of stack "data sample"
This works alright, but it puts "YES" as 1 and "NO" as 2, apparently based on the ID. What I want is to be able to code the correct answers "1" & the incorrect answers as "-1", with the unanswered items as "0".
So I tried scripts like this, with -1 for the incorrect buttons:
put -1 into dataValue1
And this in the "Go Next Page " btn:
send dataValue1 to field "1" of stack "data sample"
But get error message:
Type Handler: can't find handler
Line: send dataValue1 to field "1" of stack "data sample"
I can't figure out what is wrong. I've tried many permutations that I have not listed. Thanks for any help,
More information about the Use-livecode