Say I have a window with a few text fields, tied to memory tags.
I could set these fields bidirectional, so whatever I enter gets saved to those tags.
But what I want is a way to input text in the field and not have it get saved to the tags until I click a button (I also don’t want it refreshing with tag values either once the panel is active).
You could add a custom property like “TagPath” to each field. Use an indirect tag binding to use the “TagPath” property for binding a tag to a field.
In your Python script you could use container.getComponents() to get all the components in the container (filter to get only the fields you want) and write to the appropriate tags using the TagPath and value properties of the fields.
For example:
root = event.source.parent
for comp in root.getComponents():
try:
system.tag.write(comp.TagPath,comp.intValue)
except AttributeError:
pass