phetsims / calculus-grapher

"Calculus Grapher" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
4 stars 4 forks source link

Should I be able to load premade curves from one screen into another? #329

Closed Nancy-Salpepi closed 1 year ago

Nancy-Salpepi commented 1 year ago

Test device MacBook Air M1 chip

Operating System 13.2.1

Browser Safari 16.3

Problem description For https://github.com/phetsims/qa/issues/924, I noticed that I am able to take values for originalCurve.pointsProperty using Get Value/Copy on one screen and then load that data into originalCurve.pointsProperty on a different screen. This is different behavior than in CCK-DC, where if I make a circuit on one screen, use Get Value/Copy for model.circuit and then try to Set Value on another screen for model.circuit, I get an error:

Screenshot 2023-04-01 at 8 53 03 AM

I wasn't sure if an error message should be the case for all PhET-iO sims that have properties like this or if depends on the sim.

Steps to reproduce Example:

  1. On the Advanced Screen, select sinusoid mode and create a curve
  2. Go to advancedScreen.model.curves.originalCurve.pointsProperty, press Get Value and then press Copy
  3. Go to derivativeScreen.model.curves.originalCurve.pointsProperty, paste data and press Set Value
pixelzoom commented 1 year ago

Good questions.

Just to clarify... You are NOT seeing an error message for Calculus Grapher when you follow the above steps, correct? That is what I would expect. The model is identical for all 4 screens in Calculus Grapher, so it's totally fine to use the value of originalCurve.pointsProperty for any screen. It's also OK if someone uses originalCurve.pointsProperty for predictCurve.pointsProperty, and visa versa.

The other part of your question is whether this should be prohibited because it's prohibited in CCK. The answer is no.

If that answered your questions, feel free to close.

Nancy-Salpepi commented 1 year ago

Great. Thanks for clarifying.