This simple tutorial uses the colour attribute $Color to show the basics of attribute inheritance via prototypes in Tinderbox v6.
1. How does a note become a prototype?
The easiest way to do this is to select your note, open the Inspector (â+1).
- Check the Properties Inspector (top row of buttons) is selected
- Check that the Prototype pane is selected (lower row of buttons).
- Tick the Prototype box.
For those who look under the hood, step #3 above sets the attribute
2. Basic prototype inheritance
2.1 Setting up a prototype
In this example, you have 3 notes and a prototype note, 'prototype-red'. The latter is coloured bright red so as to stand out in the demo. Especially if pre-planning prototypes, it can be helpful to give them names that make their purpose self-evident and also unlikely to be used for a note with actual content. However this is not a requirement. Aslo, if you add any of Tinderbox's built-in prototypes, they will be placed in a root-level container "Prototypes". Even so, you don't have to store all prototypes there. However, using that single container or some other container is another good way of keeping your prototypes out of the general content of your document.
A good idea when naming prototypes in a real working file is to to use a consistent prefix to the note name, e.g.
p_bright-red, etc. This ensured the prototypes are easily disambiguated from 'normal' notes.
2.2 Inheriting from a prototype
Now, Note A and Note C have now been assigned the prototype. As a result, they inherit the red colour of the prototype.
2.3 Clarification of Inheritance of Attribute Values
The value of their
$Prototype attribute will be "prototype-red", and their
$Color will be "bright red", even though you haven't actually set that attribute directly yourself.
2.4 Notes inherit prototype changes
If you now change the
$Color of the prototype note to "bright blue", all the notes using the prototype inherit the new colour. See how Note B is unaffected but the other two notes change colour to align with the prototype.
An exception to inheritance of prototype values is
$Text, which is only inherited when the prototype is first applied to a note.
2.5 Overriding prototype inheritance
Just as you can set an attribute for any note without a prototype, you can still do the same if a prototype is in use. Doing so, you can override inheritance. By manually setting Note C's
$Color to "green", notice that only Note C has now changed colour.
2.6 Locally set values trump inheritance
Now, if you alter the prototype's colour back to "bright red", only Note A follows suit.
Why so? Because whilst Note C is still using the prototype, its colour is set locally (via attribute
$Color) - i.e. at note level. The latter assignment overrides the inherited value, whereas Note A is still using the value inherited from the prototype.
2.7 Restoring prototype inheritance
If you reset Note C's colour to "none", its inheritance is restored and it turns bright red again.
2.8 Restoring inheritance of document defaults
Remove the prototype assignment for Note A and Note C. See how the notes now inherit the document's default $Color which is 'dark warm gray.'
3. Resetting Inheritance
3.1 Method 1 - Key Attributes/Get Info
One method of resetting inheritance, in either a Key Attribute (shown above) or in the Attributes section of Get Info, is to right-click the value of the affected attribute and click the pop-up menu item.
3.2 Method 2 - Properties Inspector
To reset inheritance via the Inspector:
- Select the Properties Inspector.
- Select the Quickstamp tab.
- Select the attribute group containing the attribute to reset.
- Select the target attribute.
- Click the left hand button - illustrated.
3.3 Method 3 - Action Code
$Color to inherit, after having set a local value use the code:
$Color=;. It is '=;' that does the work. Whitespace doesn't matter, this works just as well:
$Color = ;
4. Inheritance is not just for Maps or colour attributesâ¦
The effects seen above are shown in Map view. However, they work just as well in Outlines, Timelines, etc. A colour attribute was used here as it makes the effects easy to see and understand but pretty much any Tinderbox attribute can be affected by use of prototypes and inheritance.
Inheritance is not just for notes, either. Agents, separators and adornments can also be prototypes - though you'll only see adornments in Map views and separators only in Outline views.
Prototypes can even add child note(s) when applied to a note. The detail of that is beyond the scope of this article but if interested read up on the
5. Prototypes notes are flagged in Outline & Chart views
In Outline & Chart views prototypes have a light green circle behind their icon. The colour can sometimes be difficult to see but the exact shade can be adjusted to taste in Tinderbox's Document Settings: Edit menu -> Document Settingsâ¦ -> Outlines tab -> Prototype highlight. The default colour to indicate a prototype is a light green,
6. That's just the very basics coveredâ¦
Now go and try prototypes and inheritance in your own Tinderbox documents.