ioBroker.javascript icon indicating copy to clipboard operation
ioBroker.javascript copied to clipboard

Show current values when creating a blockly script

Open Stroell opened this issue 1 year ago • 3 comments

When creating/troubleshooting a blockly script, it would be super helpful to see the current values of states and e.g. current results of "if" statements at a glance. Here a basic mockup of what I mean: BlocklyMockup

You can see directly that current value of "Anwesenheit" is "wahr", the result of the "=" statement is "wahr", the result of the second "=" statement is "falsch" and that the first statement "mache Do something" will be executed.

This could be implemented for a lot of blocks, but I don´t know how complicated that would be. Also a button would make sense to enable/disable this

Stroell avatar Feb 08 '24 13:02 Stroell

In 99% of the cases it is not necessary to use those blocks (e.g. in triggers where you use the given value).

And: Your Blockly script is too complex. A comparison with true or false is redundant code and "sonst falls" should be a normal "sonst". See https://www.youtube.com/watch?v=J9j3K0X9vlc

klein0r avatar Feb 08 '24 19:02 klein0r

Hey, I know your Videos. Thanks for them 👍 This was just one example to show what I mean with the feature request.

So let me take this one. It would be nice if you could see the current value of the variable IAQ, which "und" is currently "true" and which "falls"/"sonst falls" will be executed.

image

PS: After a brave migration to RedisDB (I don´t need instructions for that!!!) I know that a boolean value can be "true", "false" or "NULL", so my bad example from above covers this scenario ;)

Stroell avatar Feb 08 '24 20:02 Stroell

It would be nice if you could see the current value of the variable IAQ

That's even harder. Since there is no interface to the variables in a specific script. And those variable blocks are defined by Google.

klein0r avatar Feb 09 '24 09:02 klein0r