Closed arouinfar closed 1 year ago
@pixelzoom would you have any reservations about changing
quadraticProperty
tophetioReadOnly: false
?
No. I'll make it so.
Done in the above commits. @arouinfar please review, close if OK.
@pixelzoom would you have any reservations about changing
quadraticProperty
tophetioReadOnly: false
?No. I'll make it so.
Looks like you accidentally did this one backwards and made savedQuadraticProperty
phetioReadOnly: true
instead. Can you make them both phetioReadOnly: false
?
That's not possible - quadraticProperty
is a derived Property.
Do you really want me to restore savedQuadraticProperty
to phetioReadOnly: false
? It's type is PropertyIO<NullableIO<QuadraticIO>>
and there is no way to set a value of that type via Studio. It would be a dubious affair setting it via the programming API.
That's not possible - quadraticProperty is a derived Property.
Understood, thanks @pixelzoom.
Do you really want me to restore savedQuadraticProperty to phetioReadOnly: false? It's type is PropertyIO<NullableIO
> and there is no way to set a value of that type via Studio. It would be a dubious affair setting it via the programming API.
Yes, please. The original design spec included presetting the saved quadratic. This is feasible to do with he API if Studio is being used to predetermine the saved quadratic. I've detailed how to use the 'Get Command' functionality to do this in examples.md:
If you would like to change the saved quadratic in your wrapper code, use the
savedQuadraticProperty
. We recommend that you predetermine the saved quadratics using Studio. The “Get Command” button in the PhET-iO Studio Element Panel will populate the textbox with the correspondingphetioClient.invoke
command which can be copied to your clipboard.
graphingQuadratics.exploreScreen.model.savedQuadraticProperty
graphingQuadratics.standardFormScreen.model.savedQuadraticProperty
graphingQuadratics.vertexFormScreen.model.savedQuadraticProperty
graphingQuadratics.focusAndDirectrixScreen.model.savedQuadraticProperty
Changes to savedQuadraticProperty
and the API file have been reverted. Closing.
For https://github.com/phetsims/qa/issues/959
@Nancy-Salpepi asked over Slack:
The reason for this discrepancy is that
quadraticProperty
is read-only, but then I started wondering why we treat these two properties differently. Consulting the PhET-iO design doc, I found these requirements:This appears to be the reason why the
quadraticProperty
is read-only but thesavedQuadraticProperty
is not. That said, I don't know if we would have made the same decisions if starting over today. If clients want to create a quadratic with the API, they need to communicate with three different properties (one for each coefficient in the equation). It seems more convenient for instructional designers to export the desired quadratics using the 'Get Command' functionality in Studio, and then share the code with the wrapper developer. This is the method we recommend for creating a saved quadratic for comparison purposes.@pixelzoom would you have any reservations about changing
quadraticProperty
tophetioReadOnly: false
?