Hi All, I have created custom block which can add item dynamically using the mutation. For ex: Suppose i have added 5 items in block dynamically and want to get value of its connected block... How do i get value from the block.
I don't know where should I write code to get value as: blogger, getRegal, soloEdge
Blockly.Python['import_value'] = function (block) {
var text_import_value = block.getFieldValue('IMPORT_VALUE');
// TODO: Assemble Python into code variable.
console.log("import_value Block", text_import_value) // Getting first value as: blogger
var code = '' + value_regal_import + '\n';
return [code, Blockly.Python.ORDER_NONE];
};
Blockly.Python['basic_regal_imports'] = function (block) {
var value_regal_import = Blockly.Python.valueToCode(block, 'REGAL_IMPORT', Blockly.Python.ORDER_ATOMIC);
// TODO: Assemble Python into code variable.
console.log("Main Regal Import block", value_regal_import) // Here nothing is displaying
// var code = regal_import + '' + value_regal_import + '' + regal_import + '\n';
var code = ''+value_regal_import+'\n';
return code;
};
Help will be appreciated, Thanks in advance.