File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -563,7 +563,7 @@ public class BlockMenus implements DragClient {
563563 if (block. nextBlock) block. nextBlock. allBlocksDo(function (b : Block): void {
564564 if (b . op == Specs. GET_PARAM ) b . parameterIndex = - 1 ; // parameters may have changed; clear cached indices
565565 });
566- for each (var caller: Block in app. runtime. allCallsOf(oldSpec)) {
566+ for each (var caller: Block in app. runtime. allCallsOf(oldSpec, app . viewedObj() )) {
567567 var oldArgs: Array = caller. args ;
568568 caller. setSpec(newSpec, block. defaultArgValues);
569569 for (var i: int = 0 ; i < oldArgs. length ; i++ ) {
Original file line number Diff line number Diff line change @@ -728,12 +728,12 @@ public class ScratchRuntime {
728728 return result ;
729729 }
730730
731- public function allCallsOf (callee :String ):Array {
731+ public function allCallsOf (callee :String , owner : ScratchObj ):Array {
732732 var result : Array = [];
733- for each (var stack : Block in allStacks() ) {
733+ for each (var stack : Block in owner . scripts ) {
734734 // for each block in stack
735735 stack . allBlocksDo(function (b : Block): void {
736- if (( b . op == Specs. CALL ) && ( b . spec == callee ) ) result . push (b );
736+ if (b . op == Specs. CALL && b . spec == callee ) result . push (b );
737737 });
738738 }
739739 return result ;
You can’t perform that action at this time.
0 commit comments