Hi everyone
I have perspective view with numeric entry field and button with event on click script. In event script I read value from numeric entry field, multiply this value by 10 and write to tag. My script doesn't work:
def runAction(self, event):
# Create a list with the tag paths to be updated.
paths = [self.view.params.setpoint_path]
# Create a list with the update values, one value for each path.
entry_value = [self.parent.parent.getChild("FlexContainer").getChild("NumericEntryField").props.value]
multipland = 10
setpoint = entry_value * multipland
# Write operation.
system.tag.writeBlocking(paths, setpoint)
#close popup
system.perspective.closePopup('')
I think that problem is in line, which multiple value from entry field by 10. Because this script work:
def runAction(self, event):
# Create a list with the tag paths to be updated.
paths = [self.view.params.setpoint_path]
# Create a list with the update values, one value for each path.
entry_value = [self.parent.parent.getChild("FlexContainer").getChild("NumericEntryField").props.value]
# Write operation.
system.tag.writeBlocking(paths, entry_value)
#close popup
system.perspective.closePopup('')
How to fix this problem?