Create variable list, and use it for add and rename

This commit is contained in:
Rachel Fenichel
2016-06-22 16:16:31 -07:00
parent 94e0a7ff4c
commit 4a81ecb601
10 changed files with 85 additions and 28 deletions

View File

@@ -159,7 +159,7 @@ Blockly.JavaScript.init = function(workspace) {
}
var defvars = [];
var variables = Blockly.Variables.allVariables(workspace);
var variables = workspace.variableList;
if (variables.length) {
for (var i = 0; i < variables.length; i++) {
defvars[i] = Blockly.JavaScript.variableDB_.getName(variables[i],