Hi all
I am implementing scratch junior for horizontal blocks programming. Below is the block ui definition and after that I have provided the toolbox code for block. I have defined a outer block as container and and container block have two blocks as shadow blocks named as control_touch. But it is working fine if I add one shadow block but not working if add two shadow blocks. Please look over it suggest me the changes.:-

Blockly.Blocks['control_sensor_container'] = {
/**
* Block for repeat n times (external number).
* @this Blockly.Block
*/
init: function() {
this.jsonInit({
"id": "control_forever",
"message0": "%1 %2",
"args0": [
{
"type": "input_statement",
"name": "SUBSTACK"
},
{
"type": "field_image",
"src": Blockly.mainWorkspace.options.pathToMedia + "icons/control_forever.svg",
"width": 40,
"height": 40,
"alt": "*",
"flip_rtl": true
}
],
"inputsInline": true,
"previousStatement": null,
"category": Blockly.Categories.control,
"colour": Blockly.Colours.control.primary,
"colourSecondary": Blockly.Colours.control.secondary,
"colourTertiary": Blockly.Colours.control.tertiary
});
}
};
Blockly.Blocks['control_touch'] = {
/**
* Block for repeat n times (external number).
* @this Blockly.Block
*/
init: function() {
this.jsonInit({
"id": "control_touch",
"message0": "%1 %2 %3",
//"message1": "%1 %2 %3",
"args0": [
{
"type": "input_value",
"name": "CHOICE"
},
{
"type": "field_image",
"src": Blockly.mainWorkspace.options.pathToMedia + "icons/control_repeat.svg",
"width": 40,
"height": 40,
"alt": "*",
"flip_rtl": true
},
{
"type": "input_statement",
"name": "SUBSTACK"
}
],
"inputsInline": true,
"previousStatement": null,
"nextStatement": null,
"category": Blockly.Categories.control,
"colour": Blockly.Colours.control.primary,
"colourSecondary": Blockly.Colours.control.secondary,
"colourTertiary": Blockly.Colours.control.tertiary
});
}
};
Toolbox is defined as following:-
'<block type="control_sensor_container">'+
'<value name="SUBSTACK">' +
'<block type="control_touch">' +
'<value name="CHOICE">' +
'<shadow type="control_sensor_values_dropdown">' +
'<field name="CHOICE">Pressed</field>' +
'</shadow>' +
'</value>' +
'</block>' +
/*'</value>' +
'<value name="SUBSTACK1">' +*/
'<block type="control_touch">' +
'<value name="CHOICE">' +
'<shadow type="control_sensor_values_dropdown">' +
'<field name="CHOICE">Pressed</field>' +
'</shadow>' +
'</value>' +
'</block>' +
'</value>' +
'</block>' +
Thank You
Vivek