Taalversie: | ActionScript 3.0 |
Productversie: | Expression Manager Building Block 10 |
Runtimeversies: | AIR (unsupported), Flash Player 10.2 |
Interface representing an expression managed by the Expression Manager. Consuming applications
are expected to obtain a ComputedExpression instance from the Expression Manager and extract the value
of the evaluated expression from it:
- For use-cases where the value is required once and then thrown away, applications can read the 'value' property
of the ComputedExpression instance obtained from the Expression Manager and use it. Note that this approach will not
work for expressions containing remote function calls which are asynchronous by nature (since the 'value' property
will not immediately reflect the actual result of evaluation).
- For longer-running use-cases (e.g. a UX field is bound to the result of expression evaluation), applications
must bind to the 'value' property of the ComputedExpression instance obtained from the Expression Manager. This
property is a bindable property which auto-updates whenever an event occurs which affects the result of evaluation
(e.g. a variable value changes, a remote function call returns, etc.). Binding is the only approach which works
for expressions containing remote function calls.
ComputedExpression instances also dispatch events (ComputationErrorEvent instances) of type "computationErrorEvent"
whenever an evaluation error occurs (e.g. a remote function call fails). Apart from binding to the value, applications
can listen to these events for detecting errors in evaluation.