Write a boolean property with a click action in a button

In early versions of Ignition 8.0.3 I was able to write a Boolean property from a button to another boolean property in any component . For example turn on or off a visibility of a rectangle.

On a button I wrote the script on mouse released Event Handlers.

if event.clickCount == 1:
  event.source.parent.getComponent('Rectangle').visible = 0

this works for 8.0.3. But now that I’m trying to perform the same in 8.0.8 I can’t make it work.

I tried writing “false” instead of 0 but nothing happens.
I did the test with a toggle button using a binding to “selected” and It worked. What is happening??

I’m sorry for waste your time. I did a gateway reset and now it’s working. Must’ve been a bug of 8.0.8

Yes, your original code looks good. Note True / False require an initial capital:

if event.clickCount == 1:
  event.source.parent.getComponent('Rectangle').visible = False