(back to index) (edit this in the feed-back web form)
The end user may be playing around with the velocity, examining a region of special interest, perhaps a critical point.
Currently I program simulations as follows: in the Variables table I create two variables: ‘velocityInput’ and ‘velocity’. What the end user actually edits is the value of ‘velocityInput’, I code the subsequent action code to propagate that to the value of ‘velocity’.
In the action code I code an ‘if then’: if the user entered value is outside the criterium then the user entered value is rejected (notifying the end user with the ‘_alert()’ method.)
As far as I know EJS first flushes the existing velocity value and replaces it with the user entered value, and then proceeds to execute the action code.
To have in the Element properties of text fields:
This would make the Variables table cleaner, and the validation of the end user input would then be handled separately, and not by the action code.
|