Setting/resetting an attribute's default

Tinderbox Icon

What if the default value assigned to an attribute - system or user - is not what is desired? Can it be changed globally across the TBX so that all notes inheriting that attribute use a different value. Yes, it is possible by using Info view.

Select any note - it doesn't matter which - and open Info view. Display the appropriate attribute group so that the name of the attribute in question is listed in the left pane. Now select that attribute in the left pane of the view, so that the attribute name is highlighted. In the bottom of the Info view, click the 'Edit…" button. This opens the Edit Attribute Value dialog, which allows the current TBX's default value for that attribute to be altered; this is not the same as changing the current note's value for this attribute (that is set by editing the box in the right pane). Set the correct new value and click 'OK', and then close Info view. Check the new value is reflected in your document's notes.

CAUTION: take special care when editing system attribute defaults that you set a valid and sensible value, lest you cause the application and/or document to become unstable. The same holds true for altering the defaults for user attributes after first use; ensure no existing code depends on the original default value for correct function.

It is not possible to set attribute defaults via action code. This task can only be one manually via the above method or by direct editing of the XML code outside Tinderbox using a text editor.


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

Up: Attributes
Previous: Attribute Naming  Next: Using attributes as global variables/constants 

A Tinderbox Reference File : Attributes : Setting/resetting an attribute's default

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