Hi, I'm creating my own Blocks in Blockly by editing blockly_espruino.js. I can create global variables at the top of the file like
var ESPRUINO_COL = 190;
that are accessible in functions like
Blockly.Language.espruinoXXX = {...};
but these variables cannot be accessed in functions like
Blockly.JavaScript.espruinoXXX = function() {...};
How do I create global variables that I can then edit inside the JavaScript that defines what the block does?
Thanks, Rehman
@rsm started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi, I'm creating my own Blocks in Blockly by editing blockly_espruino.js. I can create global variables at the top of the file like
that are accessible in functions like
but these variables cannot be accessed in functions like
How do I create global variables that I can then edit inside the JavaScript that defines what the block does?
Thanks,
Rehman