While attempting to develop a new block with unique functionality, we face problems with the block's appearance not rendering correctly. Additionally, integrating our custom blocks with existing Blockly categories causes unexpected behavior and errors.
Here's a simplified version of the code we're working with:
Blockly.Blocks['custom_block'] = {
init: function() {
this.appendDummyInput()
.appendField("Custom Block");
this.setColour(230);
this.setTooltip("");
this.setHelpUrl("");
}
};
When trying to integrate the custom block with existing Blockly categories, we encounter errors like TypeError: Cannot read properties of undefined.
When trying to integrate the custom block with existing Blockly categories, we encounter errors like TypeError: Cannot read properties of undefined.
Blockly.Blocks['custom_block'] = {
init: function() {
this.appendDummyInput()
.appendField("Custom Block");
this.setColour(230);
this.setTooltip("");
this.setHelpUrl("");
}
};