Tinderbox v10 Icon

Prototypes 'Bequeathing' Child Notes

If you want a note that has children to be a prototype, but without its children being inherited, there is an attribute ($PrototypeBequeathsChildren) to control this aspect of inheritance. Inheriting notes gain (a new copy of) all the descendants of the prototype, not just immediate children. The outline arrangement of descendants is preserved, i.e. the note using the prototype becomes a container with the same descendant layout as the prototype. The maximum limit on bequeathed items, limited to avoid accidental infinite recursion, is 500 children (originally 100).

A note with existing children will not be bequeathed children, even if an applied prototype is set to do so. This is because the bequeathal notion was for implementing data structures rather than as some form of stamp to add additional children.

Note: prototype children are not copied recursively. When setting the prototype for a note that already exists, Tinderbox will add new children if the prototype has children, but Tinderbox will not delete any child notes that already exists. If the cloned note would have the same name as an existing child, the existing child will be unchanged and the prototype child will not be cloned.

Therefore, do ensure that none of the bequeathed descendants are actual prototypes, i.e. all prototypes used in the bequeathal should be direct children of the /Prototypes container. If any of them need to be prototype-based, create separate prototypes and store these outside the bequeathing prototype container. Thus if prototype A has child AB and grandchild ABC, then if either both AB and ABC are prototyped, their bequeathed copies are non-prototype copies of AB or ABC. Instead, if AB and ABC are based on prototypes, then the bequeathed notes inherit their source note's prototype (i.e. achieving the original desired aim).

Agent prototypes can bequeath any adornments saved within them, including image adornments.

If nesting prototypes with no intent to bequeath children, $PrototypeBequeathesChildren should be set to false. Note this is the attribute's non-default value.

It is possible to designate some prototypes as 'private' ($Private), meaning it does not appear in the selector lists available in Map & Outline view. Private prototypes can only be created via setting $Private and not via the UI.


See also—notes linking to here: