Tag Expression Blocker for Vision
An initialization script that inhibits the introduction of any new GUI blocking tag expressions
With this patch in place, the ok button on the expression binding editor will become disabled and display a warning icon with a helpful tool tip message if an inexperienced developer attempts to introduce a tag expression anywhere other than an expression tag:
Edit: Now available on The Exchange:
This approach is backward compatible because it prevents the creation of new tag expression bindings without affecting the existing ones. It also does not restrict the use of tag expressions within expression tags.
To automatically add this patch when the designer is first opened, use a dateTime Vision client tag that has its value bound to the expression now(0) and simply call the setBindingEditorPatch() library script on value change.
Edits:
• Simplified tool tip text
• Made detection more robust ~ switching from a key adapter to a document listener and capturing the ok button action event
• Added lightweight dialog popup that occurs if an unpermitted ok button click occurs
• Improved visualizations by keeping the okay button enabled and by reevaluating the warning label when on binding configurator change
• Replaced incomplete and obsolete script with a link to the current version that is now available on The Exchange
