fixed #2234 (display all reachable local variables in drop-down menu)

pull/68/head
jmoenig 2018-10-29 12:34:25 +01:00
rodzic 779fbeada4
commit 5c8108dee7
3 zmienionych plików z 16 dodań i 11 usunięć

Wyświetl plik

@ -2,6 +2,9 @@
## Development version ## Development version
###2018-10-29
* Blocks: fixed #2234 (display all reachable local variables in drop-down menu)
## v4.2.2.3 ## v4.2.2.3
* New Features: * New Features:
* new fast atomic "analyze" and "group" reporters in the "Bigger Data" library * new fast atomic "analyze" and "group" reporters in the "Bigger Data" library

Wyświetl plik

@ -6,7 +6,7 @@
<link rel="shortcut icon" href="src/favicon.ico"> <link rel="shortcut icon" href="src/favicon.ico">
<script type="text/javascript" src="src/morphic.js?version=2018-10-02"></script> <script type="text/javascript" src="src/morphic.js?version=2018-10-02"></script>
<script type="text/javascript" src="src/widgets.js?version=2018-10-02"></script> <script type="text/javascript" src="src/widgets.js?version=2018-10-02"></script>
<script type="text/javascript" src="src/blocks.js?version=2018-10-26"></script> <script type="text/javascript" src="src/blocks.js?version=2018-10-29"></script>
<script type="text/javascript" src="src/threads.js?version=2018-10-26"></script> <script type="text/javascript" src="src/threads.js?version=2018-10-26"></script>
<script type="text/javascript" src="src/objects.js?version=2018-10-23"></script> <script type="text/javascript" src="src/objects.js?version=2018-10-23"></script>
<script type="text/javascript" src="src/gui.js?version=2018-10-29"></script> <script type="text/javascript" src="src/gui.js?version=2018-10-29"></script>

Wyświetl plik

@ -148,7 +148,7 @@ CustomCommandBlockMorph, SymbolMorph, ToggleButtonMorph, DialMorph*/
// Global stuff //////////////////////////////////////////////////////// // Global stuff ////////////////////////////////////////////////////////
modules.blocks = '2018-October-26'; modules.blocks = '2018-October-29';
var SyntaxElementMorph; var SyntaxElementMorph;
var BlockMorph; var BlockMorph;
@ -596,15 +596,17 @@ SyntaxElementMorph.prototype.getVarNamesDict = function () {
); );
} else if (morph instanceof BlockMorph) { } else if (morph instanceof BlockMorph) {
morph.inputs().forEach(function (inp) { morph.inputs().forEach(function (inp) {
if (inp instanceof TemplateSlotMorph) { inp.forAllChildren(function (child){
tempVars.push(inp.contents()); if (child instanceof TemplateSlotMorph) {
} else if (inp instanceof MultiArgMorph) { tempVars.push(child.contents());
inp.children.forEach(function (m) { } else if (child instanceof MultiArgMorph) {
if (m instanceof TemplateSlotMorph) { child.children.forEach(function (m) {
tempVars.push(m.contents()); if (m instanceof TemplateSlotMorph) {
} tempVars.push(m.contents());
}); }
} });
}
});
}); });
} }
}); });