Issue
How does the dynamic updates property work in TGML?
Product Line
TAC Vista
Environment
TAC Vista 5.1.7 TGML graphics.
Cause
A graphic can contain numerous bindings to values that you want to be able to display in the graphic. When there are numerous bindings, reading the values can be time-consuming and can slow down the performance of the graphic. By setting the DynamicUpdates attributes in the Bind elements of the graphic to either disabled or enabled, you can control which values are updated (which values the graphic subscribes to) when the graphic is opened.
Resolution
- Created a Bind object in the TGML Graphic Editor
- Look at the Properties for the object.
- Under Behavior, the property DynamicUpdates is set to Enable by default.
- This can be set to Disabled and a Script can be added in an appropriate object which follows the following format:
Example - activate a binding by clicking on a button
function Click(evt){ button = evt.getTarget(); //Identify the target that has been clicked. parent = button.getParentNode(); //Find the parent node. binding = parent.getChildRecursive(""); //Identify the binding to be activated. binding.setAttribute("DynamicUpdates","Enable"); //Activate the DynamicUpdate property. }
A simple example is attached. Click to download DynamicUpdate.zip.