Good point. The Tinderbox Help file (page: ‘Attributes’) describes Action-type attributes thus:
The Action data type is only used internally.
$AgentAction, $DisplayExpression, $OnAdd, $Rule and
$TableExpression are all Action type attributes. These attribute all hold strings of Tinderbox action code and are evaluated as such when used.
In many respects, Action-type attributes can be considered a special form of String-type attribute.
In aTbRef I describe Action-type attributes thus:
The attribute data type of ‘action’ represents a string that can be used as an action; under the hood, Tinderbox caches the compiled action so it does not have to constantly re-parse the same expression. Thus these attributes should contain a string [sic] of valid Tinderbox action code.
However, both these only makes sense after the fact. Not least, you won’t see those description if you don’t like to open Help or don’t know of aTbRef.
There are several issues intersecting here:
- The “FFS, how hard can it be to just…” problem, especially for users still new to Tinderbox. How does one do [task] right now without being bored with background explanations.
- Tinderbox data types, e.g. String vs Action and the nuance of that difference.
- Expressions in general (Display, Hover, Table): how they are stored (in attributes) and displayed /used in the UI.
I get the immediacy of the first and am always happy to give the no frill-answer but an open to how to offer a better bootstrap option for new users. Something available to stop users getting caught in a loop of item #1 above.
It certainly took me a while to get the hang of how D/H/T Expressions work, and as importantly when to pre-compile them rather than compute on the fly. The latter is too nuanced for first use except for those who like to read the handbook first, which to be honest isn’t most of us most of the time—for all sorts of perfectly good pragmatic reasons.
I sense we need a tutorial type article (web, PDF, whatever) explaining the mechanics of Display Expressions, with appropriate illustrations/code examples/links to references, so as to enable better bootstrapping.