Each Tinderbox attribute, both internal-only and those exposed to the user, are defined by a single attribute tag, which is a leaf object with no children. All Tinderbox data objects have all attribute's even if they cannot make use of them, e.g. $AgentQuery can be set to a note but does nothing. Attributes are all defined with a standard set of tag attributes. For example:
<attrib Name="OutboundLinkCount" parent="General" editable="0" visibleInEditor="1" type="2" canInherit="0" default="0" >
</attrib>
Name. The (screen/action code) name of the attribute. "anything " reserved for the root <attrib>
tag.
parent. All <attrib>
tags except the root one have a parent value which is the Name of its parent <attrib>
tag.
editable. Number: zero or one. A '0' implies the attribute is calculated and thus read-only so cannot be set via via UI or action code. A '1' implies the user can edit the attribute's value
visibleInEditor. Number: zero or one. Is this attribute visible in the program's UI? A '0' implies no, a '1' implies yes.
kind. A number. Purpose uncertain but appears to indicate the attribute inherits from a preference; the number is not the order of the preference in source. Note: these mappings have varied over time. Attributes using kind are:
- 1 $Creator
- 2 $NameFont
- 3 $MapBackgroundColor
- 4 $TitleFont
- 5 not used
- 6 not used
- 7 $TextColor
- 8 $TextBackgroundColor
- 9 not used
- 10 $TextExportTemplate
- 11 $TitleForegroundColor
- 12 $TitleBackgroundColor
- 13 $PrototypeHighlightColor
- 14 $ParagraphSpacing
- 15 not used
- 16 not used
- 17 $TextSidebar
- 18 $TextFont
- 19 $TextFontSize
- 20 $InteriorScale
- 21 [hidden internal system attribute 'WindowPlace']
- 22 $TextAlign
- 23 not used
- 24 $MapBackgroundAccentColor
- 25 $MapBackgroundPattern
- 26 $SmartQuotes
- 27 $NoSpelling
type. A number: the Tinderbox data type. If the value is zero the attribute is not saved, i.e. if this attribute is missing its value must be assumed to be zero; string is this the default type. These numbers are a 0-based count of the ordering seen in the data-type popup list in the 'User' tab of the Document Inspector. Values:
- 0 string (the XML attribute 'type' is omitted if the value is 0, i.e. the default)
- 1 color
- 2 number
- 3 file
- 4 boolean
- 5 date
- 6 unsigned (only used for unseen internal system attribute 'Alias')
- 7 action (action-type attributes are system attributes only)
- 8 set
- 9 url
- 10 list
- 11 font (font-type attributes are system attributes only)
- 12 interval
- 13 dictionary
- 100 ? (used by internal system attribute 'WindowPlace')
canInherit. Number: zero or one. Only present if value is '0'. If missing, assume a value of '1'. Presumably a zero value implies the attribute is intrinsic. Only used for System attributes.
description. Only used for User attributes (v6+). String: default empty. The optional text description about a user attribute. Entered/edited via the Document Inspector's User tab.
default. A specific default, otherwise that data-type's normal default value.
The Internal attribute group
The Internal group defines 4 hidden attributes: $Alias, $EntryScript, $ExitScript, $WindowPlace. None are seen in the UI and the user should not attempt to script them via action code. $Alias is only used in item or agent objects that are aliases. Thus in the XML, the presence of the $Alias attribute in an object indicates the object is an alias rather than a normal note. In such contexts, the value of $Alias will be the $ID of its original note.