Tinderbox 7 Icon

Notes as 'item' objects in action code

The term 'item' is not a Tinderbox definition but is useful in the context of discussing action code and documenting action code usage.

A single note 'item' can be referenced as:

Strings are always quoted, whereas references are not, e.g. "Some note" vs $MyString. The string parts of expressions are quoted as in normal action code.

The overall point is that whether using a string literal value (i.e. just stating a name) or using a code expression, the outcome must evaluate to provide Tinderbox with a reference to a single note.

Complex expressions may require use of parentheses and/or use of eval() to help Tinderbox understand the order of evaluation and to deal with encapsulated evaluations.

If the argument supplied evaluates to a title rather than a path, and the title is not unique across the whole current TBX document, Tinderbox will use just the first of the matching notes as defined by their $OutlineOrder.



A Tinderbox Reference File : Objects & Concepts : Concepts : Actions : Notes as 'item' objects in action code