Hi All,
I am trying to get a reference of block from when loading the blockly.
var blc = Blockly.Block.obtain(Blockly.getMainWorkspace(), 'static_string_value');
Blockly.Blocks['static_string_value'] = {
init: function() {
this.appendDummyInput()
.appendField(new Blockly.FieldTextInput("Static String Value"), "value");
this.setInputsInline(true);
this.setOutput(true);
this.setColour('#3ea6cb');
this.setTooltip('');
this.setHelpUrl('http://www.example.com/');
}
};
Blockly.Block.obtain is throwing undefined error
I am trying to replace existing values with new blocks.
It worked fine for old blockly. Now we have upgraded to version"3.20191014.4" and Blockly.Block.obtain is not working
Any suggestions?
Thanks & Regards
Lalitha