11.4 Integer Deciders |
Whenever the XML allows an integer decider (instead of a concrete integer), these are the valid options:
component
id
="nameOfNumberSpinner"
/>) inside the parent element. If the component holds a string value, Viewpoint attempts to parse this value to an integer.All binary operations require <first
> and <second
> elements (which themselves could be deciders). The type of decider is dependent on the binary-operation attribute value.
The add binary operation string decider requires a integer decider for both the <first
> and <second
> elements. The result is the sum of the two numbers. To specify an add operation, use the "add" attribute value for the binary-operation attribute.
In this example, 60 is added to the "disk" component.
<calculate binary-operation="add"> <first> <component id="disk" /> </first> <second>60</second> </calculate>
The multiply binary operation string decider requires an integer decider for both the <first
> and <second
> elements. The result is the product of the two numbers. To specify multiplication operation, use the "multiply" attribute value for the binary-operation attribute.
Other operations require the operation attribute on the <calculate
> element. The attribute value determines the type of operation.