Tinderbox 7 Icon

Delaying code execution in notes using prototypes

In large or complex documents, it is possible to end up with many notes using the same prototype. If the later has a complex $Rule or $DisplayExpression, this can place quite a loading on the speed with which the cycle of running action code is completed. Simply setting $RuleDisabled or $DisplayExpressionDisabled in the prototype has no effect as these attributes are inherent and not inherited by notes using the prototype.

This problem can be routed around by making inheriting notes check the disablement in their prototype. This example is for a rule:

if($RuleDisabled($Prototype)){if($MyNum>0){$Color="bright red"}else{$Color=;};} 

However, be aware the rule still exists and the out if() condition is still evaluated, so this approach does remove the rule entirely.



A Tinderbox Reference File : Actions & Rules : Delaying code execution in notes using prototypes