fixed binding contexts to other receivers

variable scope for ASK / TELL
pull/95/head
jmoenig 2020-07-27 07:43:11 +02:00
rodzic 013e406951
commit e57af6137d
3 zmienionych plików z 6 dodań i 10 usunięć

Wyświetl plik

@ -2,6 +2,9 @@
## in development:
### 2020-07-27
* threads: fixed binding contexts to other receivers (variable scope for ASK / TELL)
### 2020-07-26
* objects: fixed sprite speech balloon display for sounds
* cleaned up, grouped and annotated libraries, thanks, Brian!

Wyświetl plik

@ -8,7 +8,7 @@
<script src="src/symbols.js?version=2020-07-21"></script>
<script src="src/widgets.js?version=2020-07-24"></script>
<script src="src/blocks.js?version=2020-07-24"></script>
<script src="src/threads.js?version=2020-07-24"></script>
<script src="src/threads.js?version=2020-07-27"></script>
<script src="src/objects.js?version=2020-07-26"></script>
<script src="src/gui.js?version=2020-07-24"></script>
<script src="src/paint.js?version=2020-05-17"></script>

Wyświetl plik

@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy, Map,
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, BLACK,
TableFrameMorph, ColorSlotMorph, isSnapObject, newCanvas, Symbol, SVG_Costume*/
modules.threads = '2020-July-24';
modules.threads = '2020-July-27';
var ThreadManager;
var Process;
@ -5037,14 +5037,7 @@ Process.prototype.reportContextFor = function (context, otherObj) {
result.outerContext = copy(result.outerContext);
result.outerContext.variables = copy(result.outerContext.variables);
result.outerContext.receiver = otherObj;
if (result.outerContext.variables.parentFrame) {
result.outerContext.variables.parentFrame =
copy(result.outerContext.variables.parentFrame);
result.outerContext.variables.parentFrame.parentFrame =
otherObj.variables;
} else {
result.outerContext.variables.parentFrame = otherObj.variables;
}
result.outerContext.variables.parentFrame = otherObj.variables;
}
return result;
};