This version is out of date, covering development as far as v4.2.5. It is maintained here only for inbound reference links from elsewhere. Jump to the current version of aTbRef. |
A Tinderbox Reference File : Actions & Rules : Expressions in paths |
Expressions in paths |
Many action expressions designate a note, either by name, by path, or by object keywords such as parent or prevSibling.
As of v4.0.1, new extension to the path mechanism allows you to replace the normal string literal used for note designation with an expression:
$Color(7*6)
<-- the color of the note named "42"
$Color($path)
<-- the color of the note whose name is stored in the attribute "path"
In the case of ambiguity, expression evaluation has the lowest precedence. For example, if a note happens to be named "7*6", the reference will be to that note, not to the note named "42".
In v4.2.0, a number of small changes were made to improve the behavior of the action parser, especially when using DisplayExpression, such that arithmetic in DisplayExpression now behaves as expected. For example, the DisplayExpression:
$Name+":"+$WordCount+250
now adds the numerical value of WordCount to the numeric constant 250. Previously, since the result would be a string, this was computed as a string expression since the result is a string.
Up: Actions & Rules | |
Previous: Conditional Actions (if clauses) | Next: Setting an attribute to (no value) |
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]