Tinderbox v9 Icon

Dollar-sign prefix: attribute references

When reading from/writing to attributes in action code the desired attribute is 'referenced' by using a $-prefix to the attribute name thus:


and not


Why so? Adding the $-prefix helps signal to Tinderbox that the user is referring to a specific attribute and not literal text, or an action code operator, or a user function, or a user variable of the same name.

Note on legacy use

The above holds true except for in the very early Tinderbox days, when the application would figure it out. But as action code has grown in complexity over the years it makes sense to signal user intent to the action code parser and so whilst omitting the $-prefix may still work it is formally deprecated since version 4.5.0.