You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many RIA frameworks make it easy to validate a form's parameter values before executing some business logic. For example, if a string must conform to a certain regex, the UI can present a message to the user (ideally integrated with the form itself) informing them of the invalid value, and asking for a correction, rather than simply failing during execution.
We would like to provide similar functionality for ImageJ commands. One approach would be to have an optional validation callback for each parameter that returns an object describing any validation errors that occurred (error message, type of error, etc.), which the UI-specific input harvester can then present to the user.
In a DynamicCommand, you can use a callback annotation to call methods that change values of inputs (and messages in case of visibility=MESSAGE).
For scripts, this is more difficult since the script methods are not yet known at preprocessing time, when the input harvesting happens. Maybe we could introduce some kind of "light" callbacks in the style of lambda expressions or simple boolean expressions, e.g.:
Many RIA frameworks make it easy to validate a form's parameter values before executing some business logic. For example, if a string must conform to a certain regex, the UI can present a message to the user (ideally integrated with the form itself) informing them of the invalid value, and asking for a correction, rather than simply failing during execution.
We would like to provide similar functionality for ImageJ commands. One approach would be to have an optional validation callback for each parameter that returns an object describing any validation errors that occurred (error message, type of error, etc.), which the UI-specific input harvester can then present to the user.
Migrated-From: http://trac.imagej.net/ticket/1564
The text was updated successfully, but these errors were encountered: