BlocklyDuino-v2 icon indicating copy to clipboard operation
BlocklyDuino-v2 copied to clipboard

Add define block

Open SebCanet opened this issue 4 years ago • 9 comments

SebCanet avatar Jul 10 '20 13:07 SebCanet

would have to make a block just like for variables but should have properties of definition block.

sam-tj avatar Sep 07 '20 14:09 sam-tj

Try define block on this https://sam-tj.github.io/Turtle-Studio-v1/

If works well will add this here too.

sam-tj avatar Sep 08 '20 12:09 sam-tj

Seems to be good, but there's a problem when you comment the block, the comment in code appears in loop.

SebCanet avatar Sep 08 '20 12:09 SebCanet

this image

sam-tj avatar Sep 08 '20 12:09 sam-tj

yes...helas

SebCanet avatar Sep 08 '20 12:09 SebCanet

yeah,that will be a problem. The data for that is populating from contextual menu and by default that comment goes to loop section.

sam-tj avatar Sep 08 '20 13:09 sam-tj

any idea about disabling Add comment option for some blocks?

sam-tj avatar Sep 08 '20 13:09 sam-tj

I prefer understanding how comments work and hack this, I think this could be a good question on the Blockly's forum :-D

SebCanet avatar Sep 08 '20 13:09 SebCanet

yes that would be great. Till then I have disabled the context menu for this define block. Using: this.contextMenu=false;

sam-tj avatar Sep 08 '20 13:09 sam-tj