-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use Property validation options #150
Comments
Closed
Using validation options will also make assertions like this in CurveFittingModel unnecessary: // validate Property values and update curve fit
this.orderProperty.link( order => {
// ensure the order is 1, 2 or 3: linear, quadratic or cubic
assert && assert( order === 1 || order === 2 || order === 3, `invalid order: ${order}` );
... |
SaurabhTotey
pushed a commit
that referenced
this issue
Aug 30, 2019
SaurabhTotey
pushed a commit
that referenced
this issue
Aug 30, 2019
SaurabhTotey
pushed a commit
that referenced
this issue
Aug 30, 2019
I have now added more property validation. Assigning to @pixelzoom to review. |
Looks good, closing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related to this item in code review #143:
There are currently no usages of validation options in this sim. This info is important for catching programming errors, and for future PhET-iO instrumentation.
For example, in Curve.js:
should be:
In Point.js:
should be:
So....
range
for any that have a range.valueType
orisValidValue
where possible.The text was updated successfully, but these errors were encountered: