Commit 83724de1 authored by carlosperate's avatar carlosperate

Remove mutator from functions.

Temporary change to avoid unexpected behaviour with variable scope.
Discussion at https://github.com/carlosperate/ardublockly/issues/25
parent 22bde0ee
...@@ -13,6 +13,7 @@ It adds the following features: ...@@ -13,6 +13,7 @@ It adds the following features:
* Arduino pin tracking * Arduino pin tracking
* Arduino generator unit test (incomplete) * Arduino generator unit test (incomplete)
* Procedures core class modified to include the Arduino setup() and loop() functions * Procedures core class modified to include the Arduino setup() and loop() functions
* Temporarily removed procedure's mutator responsible to add arguments
* Minor visual changes to the zoom icons positioning * Minor visual changes to the zoom icons positioning
The following features are planned to be push upstream (list will be updated as PR get accepted): The following features are planned to be push upstream (list will be updated as PR get accepted):
......
...@@ -49,7 +49,7 @@ Blockly.Blocks['procedures_defnoreturn'] = { ...@@ -49,7 +49,7 @@ Blockly.Blocks['procedures_defnoreturn'] = {
.appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE) .appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE)
.appendField(nameField, 'NAME') .appendField(nameField, 'NAME')
.appendField('', 'PARAMS'); .appendField('', 'PARAMS');
this.setMutator(new Blockly.Mutator(['procedures_mutatorarg'])); //this.setMutator(new Blockly.Mutator(['procedures_mutatorarg']));
if (Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT) { if (Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT) {
this.setCommentText(Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT); this.setCommentText(Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT);
} }
...@@ -396,7 +396,7 @@ Blockly.Blocks['procedures_defreturn'] = { ...@@ -396,7 +396,7 @@ Blockly.Blocks['procedures_defreturn'] = {
this.appendValueInput('RETURN') this.appendValueInput('RETURN')
.setAlign(Blockly.ALIGN_RIGHT) .setAlign(Blockly.ALIGN_RIGHT)
.appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN); .appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN);
this.setMutator(new Blockly.Mutator(['procedures_mutatorarg'])); //this.setMutator(new Blockly.Mutator(['procedures_mutatorarg']));
if (Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT) { if (Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT) {
this.setCommentText(Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT); this.setCommentText(Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT);
} }
......
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