If no value has been defined via a preference or otherwise inherited or manually set, the following are the value of 'no value' for each attribute data type.
- Boolean:
false
- Date: "
never
" (a string) - Number:
0
- Interval: "
00:00
" (a string representing zero hours:minutes) - String & String-type: "" (an empty string, no data).
- List†:
[]
. - Set†:
[]
. - Dictionary†:
{}
.
All the remaining Tinderbox data types are essentially special forms of a String-based data type and so use the same default value, of an empty string:
- Action.
- Color.
- File.
- Font.
- URL.
†. Multi-value types. Only 3 types, out of all the data types above, allow the storage of multiple values (i.e. 'lists' of discrete values), two of which are themselves specialised versions of the first:
- List. A list of values.
- Set. A list where any case-sensitive duplicate values are automatically removed (so strings 'Cat' and 'cat' are still treated discrete values). Sets also use a lexical auto-sort so cannot be relied upon to retain user-set listing order (e.g. such as by setting $Sort).
- Dictionary. Holds a list of 'key:value' pair values. Keys must be unique, as this is how the list data is queried/altered (i.e. asked for or edited). Currently, key values that are themselves lists are allowed but cannot be accessed via action code. Again sorting the list is of little value as data is accessed via the key for any discrete 'key:value' list value.
Set vs. List
A historical note for long-time users. Originally, the Set data type was the only multi-value data type, with List and Dictionary being added later on. The original Set only auto-sorted occasionally, if at all. Since changes in v8 Sets now are always auto-sorted, for performance reasons. That change may catch out long-term users of Tinderbox as previously Sets re-sorted so rarely that the made sense as de-duplicated Lists. Now that affordance has gone, use List type to preserve order and List.unique if de-duplication is needed.
However, the List data type is best understood as the basic (multi-value) listing type—it records what is entered in the order entered and does not alter it.
See also—notes linking to here: