This version is out of date, covering development from v8.0.0 to v8.x.x. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v8 Icon

DisplayExpressionDisabled


Attribute Data Type: 

Attribute Default Value: 

Attribute Group: 

Attribute Purpose: 

Attribute Inherited from Preferences?   

Attribute UI-configurable? 

Attribute Read-Only? 

Attribute Intrinsic? 

Attribute First Added: 

Attribute Altered: 

 boolean   [other boolean-type attributes]

 false

 General   [other General Group attributes]

 Action code

 No

 Yes

 No

 Yes

 Baseline

 


Allows the $DisplayExpression for a specific note to be disabled. It is intrinsic and thus not inherited.

A primary use is suppressing code from be run in prototypes.

$DisplayExpressionDisabled is convenient when a display expression is shared by all the children of a prototype, but it is not desirable that it be applied to the prototype itself. Thus it can be useful to suppress $DisplayExpression activation in prototypes. Previously, it was necessary include an 'if($Prototype)' test which was cumbersome and meant every inheriting note had to run the additional if test adding load to the action code cycle. That workaround can be discarded and the attribute set to false in the Prototype. Because, atypically, this attribute is not inherited from a prototype, the prototype's setting does not affect the Display Expression in notes using the prototype.

For example, the intention may be for books to be displayed with their price:

DisplayExpression: $Name+" $"+$Price 

but the prototype for books, "Book Prototype" could inhibit this $DisplayExpression to display its name without a meaningless price tag.

A similar control is supplied for rules: $RuleDisabled.

$DisplayExpressionDisabled can be set via the Text Inspector → Title tab, 'Display Expression Enabled' input box. Be aware the latter label describes the 'opposite' state compared to the underlying attribute.