Mobsya / blockly

The web-based visual programming editor.
https://developers.google.com/blockly/
Apache License 2.0
1 stars 9 forks source link

"when" in Blockly #15

Open motib opened 7 years ago

motib commented 7 years ago

VPL now uses "when" extensively in polling events, whereas Blockly still uses "if". The behavior should be consistent.

One example: If you check the status of buttons looking for "button touched", touching the button is often detected several times. With "when" this is no longer a problem. There is a workaround - checking for "button released" but it would be better to be consistent with VPL.

stephanemagnenat commented 7 years ago

I do not agree, Thymio Blockly is lower level than VPL, and therefore provides both "if" and "when" constructs within the "logic" area. I think that it is reasonable to let the user choose which construct to use.

motib commented 7 years ago

I meant something else. When an event like "on forward button ...", Blockly has to check whether it is touched or released. I am sure I say an "if" but looking at it again I now see a "when". Maybe it was a different version or I'm just getting senile. Anyway, the issues can remain closed.

stephanemagnenat commented 7 years ago

You are right, issue re-opened.

motib commented 7 years ago

I thought I was wrong, not right! Because I couldn't recreate a generated "if" for a block. Did you manage to do so? If not, the issue is closed.