Blockly.Blocks['apple_container'] = {
init: function() {
this.appendDummyInput()
.appendField("Apple Container");
this.appendStatementInput("apples")
.setCheck("apple");
this.setColour(230);
this.setTooltip("");
this.setHelpUrl("");
}
};
Blockly.Blocks['apple'] = {
init: function() {
this.appendDummyInput()
.appendField("Apple");
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.setColour(230);
this.setTooltip("");
this.setHelpUrl("");
}
};
Blockly.Blocks['orange'] = {
init: function() {
this.appendDummyInput()
.appendField("Orange");
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.setColour(230);
this.setTooltip("");
this.setHelpUrl("");
}
};--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/8c4d9ea2-29d1-4d94-93c5-55cc622d8586%40googlegroups.com.
Blockly.Blocks['apple_container'] = {
init: function() {
this.appendDummyInput()
.appendField("Apple Container");
this.appendStatementInput("apples")
.setCheck("apple");
this.setColour(230);
}
};
Blockly.Blocks['apple'] = {
init: function() {
this.appendDummyInput()
.appendField("Apple");
// This makes it so it can go into the statement input.
this.setPreviousStatement(true, 'apples');
// This makes it so other apples can follow it.
this.setNextStatement(true, 'apples');
this.setColour(230);
}
};
Blockly.Blocks['orange'] = {
init: function() {
this.appendDummyInput()
.appendField("Orange");
// This makes it so that it cannot go into the apple input.
this.setPreviousStatement(true, 'oranges');
// But anything can follow it, including apples.
this.setNextStatement(true, null);
this.setColour(230);
}
};
--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/99e86898-0af5-4b3e-a6f8-09158d44ecb1%40googlegroups.com.
Blockly.Connection.prototype.checkType_ = function(otherConnection) {
// I changed the below to be && intead of ||
if (!this.check_ && !otherConnection.check_) {
// *Both* sides are promiscuous enough that anything will fit.
return true;
}
// ...
};--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/ce628b33-47f6-4777-b937-e09e8ac07412%40googlegroups.com.