Tinderbox v9 Icon

Disabling action inheritance

Three special boolean system attributes control inheritance of rules, edicts and display expressions: $RuleDisabled, $EdictDisabled and $DisplayExpressionDisabled. Importantly, these attributes are all intrinsic, i.e. their values are not inherited.

This mechanism allows a prototype to store a rules, edict or display expression, but have the option to not execute the code in the prototype. Consider a rule that alters one of the note's attributes. If run in the prototype, this modified would be unintentionally inherited by other notes. By disabling the prototype's rule via $RuleDisabled, the rule does not run in the prototype but does run in notes using the prototype. Of course, any note using the prototype is still free to disable the rule via its own $RuleDisabled as it doesn't inherit the prototype's value.

The document default value of $RuleDisabled is false. If it is set to true in the prototype, then the value inherited by notes using the prototype is false. Why not true? This occurs because the attribute is intrinsic and its state is never inherited so the (inherited) default value is always the document level default.

This leads to a reverse problem, what if it is desirable for the prototype to tell inheriting notes to observe the disablement state in their prototype? See chaining prototypes.

A Tinderbox Reference File : Objects & Concepts : Concepts : Prototypes : Disabling action inheritance