mirror of
https://github.com/google/blockly.git
synced 2026-01-05 08:00:09 +01:00
Create variable list, and use it for add and rename
This commit is contained in:
@@ -31,7 +31,7 @@ goog.require('Blockly.PHP');
|
||||
Blockly.PHP['procedures_defreturn'] = function(block) {
|
||||
// Define a procedure with a return value.
|
||||
// First, add a 'global' statement for every variable that is assigned.
|
||||
var globals = Blockly.Variables.allVariables(block);
|
||||
var globals = block.workspace.variableList;
|
||||
for (var i = globals.length - 1; i >= 0; i--) {
|
||||
var varName = globals[i];
|
||||
if (block.arguments_.indexOf(varName) == -1) {
|
||||
|
||||
Reference in New Issue
Block a user