You are reading a single comment by @rsm and its replies. Click here to read the full conversation.
  • 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

About

Avatar for rsm @rsm started