Tinderbox v9 Icon

Attribute Naming

Attribute names, whatever their type, are:

The Document Inspector's User tab for making new user attributes will suppress keyboard input for any other characters to help enforce this rule. So you may have 'ToDo' but not 'To-Do', 'To_Do' or To Do' as an attribute name. A name of '8' or '009' is allowed but probably none too useful.

When importing spreadsheet type data tables and new attribute names are coerced from column names, an underscore will be used to replace any unsupported characters (e.g. accented characters).

Take great care when creating (or importing) attributes names with numbers, e.g. '2' or '37'. If the attribute names and default value (likely zero) differ this can confuse Tinderbox's legacy support in code parsing. Thus id attribute '2' has a default value of zero, $SomeNumber + 2 may be misinterpreted as $SomeNumber + $2, i.e. $SomeNumber + 0, and thus no change. Of if the $2 in context has a value of '10' then the code might parse as $SomeNumber + 10. so not as expected. So, number-only attribute names are allowed, but liable to cause problems so are an ill-advised choice unless circumstances dictates so.

Although you may use any letter case combination it is worth noting that the general style in Tinderbox, and examples in the manual etc., tend to one of two styles opening capital ('Prototype') or inter-capitalised ('AgentPriority'). For newer users, adopting the latter form for user attributes will help to distinguish attributes when seen in action and export code.

Perhaps self-evident, but adopting self explanatory names is useful both in writing codes but also when displaying Displayed Attributes.

Attributes can be renamed.

Single character names (i.e. single letter - see list above) are allowed though are impractical and not recommended. Such brevity is likely to cause error at some point.

NOTE re Attribute names & the $-prefix. In action code, when an attribute's value is referred to a $-prefix is used. Thus to call the value if the attribute WordCount, $WordCount is used. To refer to the name of said attribute, use "WordCount". Within aTbRef, inline references in general text which refer to Tinderbox attributes names generally use a $-prefix as a marker that it is an attribute name being cited. The latter is a slight variance with in-app usage but does aid clarity in the articles.



A Tinderbox Reference File : Attributes : Attribute Naming