Hi everybody,
I´m trying to use shareable-procedures, but I can't overwrite them,
I couldn't configure it the way I need it, yet.
1 - I need to overwrite the json toolbox of the
procedures_def
noreturn
2 - I need to delete / destroy procedures_defreturn
Firts try for overwrite the jsonTool:
-
var varDefNoRet = Blockly.Blocks.procedures_defnoreturn.init;
var json= { ...}
Blockly.workspace.updateBlock(varDefNoRet, json);but updateBlock, does not exist.
Second try:I already try with an IIFE:
(function(){var old = Blockly.Blocks.procedures_defnoreturn.init;
Blockly.Blocks.procedures_defnoreturn.init = function(){old.call(this);
this.setMutator(undefined); this.jsonInit( { ... })
};})()
(function() {
// Elimina el bloque 'procedures_defreturn' de Blockly.Blocks
//delete Blockly.Blocks.procedures_defreturn;
// Elimina el bloque 'procedures_callreturn' de Blockly.Blocks
//delete Blockly.Blocks.procedures_callreturn;
})();
Third try:
Blockly.Blocks.procedures_defreturn.init = function(){
varDefRet.call(this); this.setMutator(undefined); this.disabled = true; }
this.jsonInit( { ... })
}
Is there a method that hits those blocks directly?
Has anyone already tried to do it?
Could you please help me?
Thank you so much!!!
Pía