studio
studio copied to clipboard
Dashboard: Add the $event structures to the expression builder
Several widgets produce events with there own structure (named $...). I would like the definition of these structures to be present in the expression builder so I can use the data present in these events.
(I now looked into the source code to find the right name of a struct member)
If you want to access this event values you need to define input of type struct:$...
in some action or widget. When you do that in the expression builder you can see the members of these structures, for example:
Thanks for your answer. Please add this to the documentation of the expression builder.
It is important to realize the expression builder is very context sensitive. The current explaination on https://www.envox.eu/eez-studio-docs/15-variables/ is not very explicit about this.
I did not realize it not just takes global/local variables but also the input, outputs and went looking for the struct member name in the source code.
Maybe also make the title of the expression builder dynamic to show its context:
Expression builder: projectname:page/action:component:field
It is working but, while testing this one I found 1 edge case:
Here the SCPI command field doesn't have an expression builder 'thingy', but the fields are used here. This also relates to #287 and might be considered separate from this issue.