Is it possible to use confirmation with the boolean toggle button?
I know i can use confirmation with the 2 state toggle, but i can’t seem to replicate the visual styling of the boolean toggle on the 2 state toggle.
You can script it like
if system.gui.confirm("Are you sure you want to change the scanner configuration?" , "Confirmation"):
value = event.source.parent.parent.parent.fileExplorerSelected
system.tag.writeToTag('PL2/Line_Scanner/configfile', value)
Yes, you can add a confirm like onestank said, but the best way is to create a custom property that holds the bi-directional binding instead of your ‘selected’ property. That way you can use a property change script (based on the ‘selected’ property firing) with the system.gui.confirm() function to set your custom property to the new value of the ‘selected’ property.