Scope of setVar

Hi, I'm trying to show/hide widgets using other widgets (buttons), and I saw the community post on this topic before, which you seem to have added the setVar method to make easier. I can specify a local or widget variable and control the visibility from within the same widget, but when I use setVar, it seems to be ineffective.

I think the problem I'm running into is that I don't know what setVar sets exactly. Does setVar set a variable in the 'local' widget object, the 'this.variables' object or the 'globals' object, or something else?

Setting 'visible' using the set command doesn't seem to work, although it seems like it should be a directly settable prop.

Per usual here's a little video to make it clearer. As you can tell, i'm waist deep in interface design right now. I should be done within the week and will stop asking you my million questions! Thanks again for making this amazing tool.

For the record, I rarely watch the videos, I prefer reading :slight_smile:

What's missing from the setVar description is that custom variables can be used in properties using the dedicated syntax. They are not stored in an exposed javascript object such as locals, although if needed scripts can retrieve them using getVar. It's not mandatory to use the VAR{} syntax to create a variable though.

Got it. I eventually figured that one out. For a one man show, your documentation is actually surprisingly good, it's just a lot to communicate. The only thing I'm struggling with understanding is where standard JS + CSS work and where your parsing is limiting scope and looking for flags, but that's just because I'm a developer.