Commit 572aef78 authored by carlosperate's avatar carlosperate

Revert blockly demos to not use blockly types.

parent 2f035065
...@@ -55,10 +55,10 @@ Blockly.Blocks['factory_base'] = { ...@@ -55,10 +55,10 @@ Blockly.Blocks['factory_base'] = {
.appendField('colour'); .appendField('colour');
/* /*
this.appendValueInput('TOOLTIP') this.appendValueInput('TOOLTIP')
.setCheck(Blockly.StaticTyping.BlocklyTypes.TEXT.compatibles()) .setCheck('String')
.appendField('tooltip'); .appendField('tooltip');
this.appendValueInput('HELP') this.appendValueInput('HELP')
.setCheck(Blockly.StaticTyping.BlocklyTypes.TEXT.compatibles()) .setCheck('String')
.appendField('help url'); .appendField('help url');
*/ */
this.setTooltip('Build a custom block by plugging\n' + this.setTooltip('Build a custom block by plugging\n' +
...@@ -608,7 +608,7 @@ Blockly.Blocks['type_group_item'] = { ...@@ -608,7 +608,7 @@ Blockly.Blocks['type_group_item'] = {
Blockly.Blocks['type_null'] = { Blockly.Blocks['type_null'] = {
// Null type. // Null type.
valueType: Blockly.StaticTyping.BlocklyTypes.NULL.basicType, valueType: null,
init: function() { init: function() {
this.setColour(230); this.setColour(230);
this.appendDummyInput() this.appendDummyInput()
...@@ -621,7 +621,7 @@ Blockly.Blocks['type_null'] = { ...@@ -621,7 +621,7 @@ Blockly.Blocks['type_null'] = {
Blockly.Blocks['type_boolean'] = { Blockly.Blocks['type_boolean'] = {
// Boolean type. // Boolean type.
valueType: Blockly.StaticTyping.BlocklyTypes.BOOLEAN.basicType, valueType: 'Boolean',
init: function() { init: function() {
this.setColour(230); this.setColour(230);
this.appendDummyInput() this.appendDummyInput()
...@@ -634,7 +634,7 @@ Blockly.Blocks['type_boolean'] = { ...@@ -634,7 +634,7 @@ Blockly.Blocks['type_boolean'] = {
Blockly.Blocks['type_number'] = { Blockly.Blocks['type_number'] = {
// Number type. // Number type.
valueType: Blockly.StaticTyping.BlocklyTypes.NUMBER.basicType, valueType: 'Number',
init: function() { init: function() {
this.setColour(230); this.setColour(230);
this.appendDummyInput() this.appendDummyInput()
...@@ -647,7 +647,7 @@ Blockly.Blocks['type_number'] = { ...@@ -647,7 +647,7 @@ Blockly.Blocks['type_number'] = {
Blockly.Blocks['type_string'] = { Blockly.Blocks['type_string'] = {
// String type. // String type.
valueType: Blockly.StaticTyping.BlocklyTypes.TEXT.basicType, valueType: 'String',
init: function() { init: function() {
this.setColour(230); this.setColour(230);
this.appendDummyInput() this.appendDummyInput()
...@@ -660,7 +660,7 @@ Blockly.Blocks['type_string'] = { ...@@ -660,7 +660,7 @@ Blockly.Blocks['type_string'] = {
Blockly.Blocks['type_list'] = { Blockly.Blocks['type_list'] = {
// List type. // List type.
valueType: Blockly.StaticTyping.BlocklyTypes.ARRAY.basicType, valueType: 'Array',
init: function() { init: function() {
this.setColour(230); this.setColour(230);
this.appendDummyInput() this.appendDummyInput()
......
...@@ -197,7 +197,7 @@ Blockly.Blocks['graph_get_x'] = { ...@@ -197,7 +197,7 @@ Blockly.Blocks['graph_get_x'] = {
this.setColour(330); this.setColour(330);
this.appendDummyInput() this.appendDummyInput()
.appendField('x'); .appendField('x');
this.setOutput(true, Blockly.StaticTyping.BlocklyTypes.NUMBER.basicType); this.setOutput(true, 'Number');
this.setTooltip(Blockly.Msg.VARIABLES_GET_TOOLTIP); this.setTooltip(Blockly.Msg.VARIABLES_GET_TOOLTIP);
} }
}; };
...@@ -214,7 +214,7 @@ Blockly.Blocks['graph_set_y'] = { ...@@ -214,7 +214,7 @@ Blockly.Blocks['graph_set_y'] = {
this.setColour(330); this.setColour(330);
this.appendValueInput('VALUE') this.appendValueInput('VALUE')
.appendField('y =') .appendField('y =')
.setCheck(Blockly.StaticTyping.BlocklyTypes.NUMBER.compatibles()); .setCheck('Number');
this.setTooltip(Blockly.Msg.VARIABLES_SET_TOOLTIP); this.setTooltip(Blockly.Msg.VARIABLES_SET_TOOLTIP);
} }
}; };
......
...@@ -49,7 +49,7 @@ Blockly.Blocks['plane_get_rows'] = { ...@@ -49,7 +49,7 @@ Blockly.Blocks['plane_get_rows'] = {
this.setColour(330); this.setColour(330);
this.appendDummyInput() this.appendDummyInput()
.appendField(Plane.getMsg('Plane_getRows'), 'title'); .appendField(Plane.getMsg('Plane_getRows'), 'title');
this.setOutput(true, Blockly.StaticTyping.BlocklyType.NUMBER); this.setOutput(true, 'Number');
}, },
customUpdate: function() { customUpdate: function() {
this.setFieldValue( this.setFieldValue(
...@@ -69,7 +69,7 @@ Blockly.Blocks['plane_get_rows1st'] = { ...@@ -69,7 +69,7 @@ Blockly.Blocks['plane_get_rows1st'] = {
this.setColour(330); this.setColour(330);
this.appendDummyInput() this.appendDummyInput()
.appendField(Plane.getMsg('Plane_getRows1'), 'title'); .appendField(Plane.getMsg('Plane_getRows1'), 'title');
this.setOutput(true, Blockly.StaticTyping.BlocklyType.NUMBER); this.setOutput(true, 'Number');
}, },
customUpdate: function() { customUpdate: function() {
this.setFieldValue( this.setFieldValue(
...@@ -89,7 +89,7 @@ Blockly.Blocks['plane_get_rows2nd'] = { ...@@ -89,7 +89,7 @@ Blockly.Blocks['plane_get_rows2nd'] = {
this.setColour(330); this.setColour(330);
this.appendDummyInput() this.appendDummyInput()
.appendField(Plane.getMsg('Plane_getRows2'), 'title'); .appendField(Plane.getMsg('Plane_getRows2'), 'title');
this.setOutput(true, Blockly.StaticTyping.BlocklyType.NUMBER); this.setOutput(true, 'Number');
}, },
customUpdate: function() { customUpdate: function() {
this.setFieldValue( this.setFieldValue(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment