Hello,
The issue we are facing is like we have added setcheck for our block and in the setcheck we have not given some 'x' blocks name but even though we have not given the name for it the first block is allowed to attach the 'x' block into it.
so our first block options are like --
Blockly.Blocks['rule'] = {
init: function() {
this.appendDummyInput()
.appendField("Rule")
.appendField(new Blockly.FieldTextInput("tag"), "IDENTIFIER");
this.appendStatementInput("CONDITION")
.setCheck(["If","OR"])
.appendField("C");
this.appendStatementInput("ACTION")
.setCheck(["Action", "Rule"])
.appendField("A");
this.setPreviousStatement(true, ["Rule"]);
this.setNextStatement(true, ["Rule"]);
this.setColour('#8a69c8');
this.setTooltip('');
this.setHelpUrl('');
}
};
and our 'x' block which we don't want to attach to our first block is --
Blockly.Blocks['x'] = {
this.appendDummyInput()
.appendField("Filter")
.appendField(lhs_dropdown, 'OBJECT');
this.setInputsInline(true);
this.setPreviousStatement(true, ["Filter", "OR"]);
this.setNextStatement(true, ["Filter", "OR"]);
this.setColour('#e75959');
this.setTooltip('');
this.setHelpUrl('');
}
we are not getting why our 'x' block is attaching to the other block . can anyone please help us on this issue?
regards,
sahithi