DisplayExpressionDisabled

Tinderbox Icon


Attribute Data Type:   boolean
Attribute Default Value:   false
Atrribute Group:   General
Atrribute Purpose:   Action code
Attribute Inherited from Preferences?     No
Attribute Read-Only?   No

New to v5.8.0, a Boolean attribute, $DisplayExpressionDisabled, allows the DisplayExpression for a specific note to be disabled. $DisplayExpressionDisabled is inherent to a note. Atypically for inheritance in Tinderbox, it is not inherited from a note's prototype (unlike most other attributes) - partly because a primary use is suppressing code running 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 isn't inherited from a prototype, the prototype's setting doesn't 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.


Possible relevant notes (via "Similar Notes" feature):

Up: Boolean Attributes

A Tinderbox Reference File : Attributes : Attribute Data Types : Boolean Attributes : DisplayExpressionDisabled

Quicklinks: Attributes | Action Codes | Export Codes | Designators | Date Formats | aTbRef Site Map

[Last updated: 16 May 2012, using v5.11.1]


Search:

Google search aTbRef for:  


Creative Commons Licence

aTbRef by Mark Anderson is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

[See aTbRef CC licence Attribution & Waiver info]

Made with Tinderbox