I created a screen that allows students to resize the graph axes, graph points, and add line/curve of best fit. But, as soon as the student goes to the second table in the screen to type their extrapolated data answer from the graph, the graph resets immediately. I cannot find my error. I am including the activity. Thanks for the help.
I think itâs because when the table is entered it might reset all the buttons on the screen (this might be a bug).
One way you could test this is to put the code
resetLabel: âresetâ
into the buttons. Then after you click on them, it will display the text âresetâ, and according to my theory, when you click in the table, they will go back to buttons.
Setting aside whether this is a bug or not, itâs annoying, but can I suggest a different interface?
I think checkboxes work well for this type of thing so you can have a checkbox for âShow line of best fitâ and another for âShow curve of best fitâ. They also have the advantage of not randomly resetting!
Bryn, thanks for the reply. Hmmm, checkboxes. I hadnât thought of that. Iâm still new to this game. Iâll mess around with it.
My thought is the reason it is resetting is that as soon as I click in the second text box, the timer resets to zero and that resets everything that was running in the animation showing the graph scale changing with timeSincePress. I was able on a different page to make the value that controls changing the graph static and that stopped the problem, but it also stopped the cool animation effect that can stick in a kidâs head when they start to think how their axes will change. I think there could be a use for lastValue and capture here, but I am still really weak with CL. For example, capture the axes scale settings from the table as the students put the value in. Then, the system animates out to the new values and they become the new defaults. But, I canât figure it out. This stuff keeps me up until 3:00 AM nightly. Ugh.
Yep - that is frustrating. By the way, I think your activity is now marked as private so others probably wonât be able to help you easily either.
One suggestion is that if John Rowe or Jay Chow still have their 30-minute one-on-one CL bookings, I think they could definitely talk you through what youâre trying to achieve here.
Your activity is currently private, but not sure if youâre aware also that timeSincePress will reset after a certain time frame. I think default is 10 seconds, but you can extend it by entering a number. timeSincePress(100) changes it to 100 seconds. I donât know the upper limit.
Here is a link that is not private. The timeSincePress(2.4) is specific to the animation. I thnk there is something in the capture sink, but I donât know how to do it.
Iâm wondering if anyone figured this out somewhere else. I also need to NOT have the graph reset when I enter a second table on the screen after a timer has run to show an animation.
With the introduction of Actions and the ticker, this is a bit more doable now as you can have the âtimerâ in the graph incrementing using the ticker rather than using .timeSincePress
If you share with us the activity youâre working on, we might be able to offer more advice on how to get it to work specifically for yours.