I want to use an action button in a table and a note. I want to write (0,0) in the table and press the Action button to validate. It works well, but then I ask to change the value in the table and press the button. But the note changes before pressing the action button.
Is it possible to do that ?
I can do it if I add a Graph : Action Button â¢ Activity Builder by Desmos
Is there an other option?
You can do it without the graph, if that’s what you prefer. You can delete the graph, keep the action button and table, and use this for the note:
when button1.pressCount=1 and table1.cellNumericValue(1,1)=0 and table1.cellNumericValue(1,2)=0 "Good job! Now enter (1,1) in the table."
when button1.pressCount=1 and button1.lastValue("x")=0 and button1.lastValue("y")=0 "Good job! Now enter (1,1) in the table."
when button1.pressCount=2 and table1.cellNumericValue(1,1)=1 and table1.cellNumericValue(1,2)=1 "Good job! Thanks!"
when button1.pressCount=2 and button1.lastValue("x")=1 and button1.lastValue("y")=1 "Good job! Thanks!"
otherwise "Enter (0,0) in the table and press «Try it»."
Thanks! It’s exactly what I want!
This breaks if you put the wrong answer first, and especially if you make multiple mistakes. That is, it doesn’t wait for a button press before the second message when you correct it to (0,0). And, you’ll get the default (0,0) message, once you hit the button too many times.