kopia lustrzana https://github.com/backface/turtlestitch
fixed binding an unbound context to a sprite
e.g. when using JOIN blocks with variable referencessnap7
rodzic
ff7b5d1c9c
commit
88a522eb57
|
@ -5,11 +5,15 @@
|
|||
* **New Features:**
|
||||
* **Notable Changes:**
|
||||
* **Notable Fixes:**
|
||||
* fixed binding an unbound context to a sprite (e.g. when using JOIN blocks)
|
||||
* fixed loading the Chinese translation, thanks, @moodykeke
|
||||
* **Documentation Updates:**
|
||||
* **Translation Updates:**
|
||||
|
||||
### 2022-01-17
|
||||
* new dev version
|
||||
* fixed loading the Chinese translation, thanks, @moodykeke
|
||||
* threads: fixed binding an unbound context to a sprite (e.g. when using JOIN blocks)
|
||||
|
||||
## 7.0.5:
|
||||
* **New Features:**
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<script src="src/symbols.js?version=2021-03-03"></script>
|
||||
<script src="src/widgets.js?version=2021-17-09"></script>
|
||||
<script src="src/blocks.js?version=2022-01-07"></script>
|
||||
<script src="src/threads.js?version=2022-01-13"></script>
|
||||
<script src="src/threads.js?version=2022-01-17"></script>
|
||||
<script src="src/objects.js?version=2022-01-03"></script>
|
||||
<script src="src/scenes.js?version=2021-11-24"></script>
|
||||
<script src="src/gui.js?version=2022-01-17"></script>
|
||||
|
|
|
@ -64,7 +64,7 @@ SnapExtensions, AlignmentMorph, TextMorph, Cloud, HatBlockMorph*/
|
|||
|
||||
/*jshint esversion: 6*/
|
||||
|
||||
modules.threads = '2022-January-13';
|
||||
modules.threads = '2022-January-17';
|
||||
|
||||
var ThreadManager;
|
||||
var Process;
|
||||
|
@ -4761,7 +4761,7 @@ Process.prototype.goToLayer = function (name) {
|
|||
|
||||
// Process scene primitives
|
||||
|
||||
Process.prototype.doSwitchToScene = function (id, transmission) { // +++
|
||||
Process.prototype.doSwitchToScene = function (id, transmission) {
|
||||
var rcvr = this.blockReceiver(),
|
||||
idx = 0,
|
||||
message = this.inputOption(transmission.at(1)),
|
||||
|
@ -5886,18 +5886,20 @@ Process.prototype.reportContextFor = function (context, otherObj) {
|
|||
rootVars;
|
||||
|
||||
result.receiver = otherObj;
|
||||
if (result.outerContext) {
|
||||
result.outerContext = copy(result.outerContext);
|
||||
result.outerContext.variables = copy(result.outerContext.variables);
|
||||
result.outerContext.receiver = otherObj;
|
||||
if (result.outerContext.variables.parentFrame) {
|
||||
rootVars = result.outerContext.variables.parentFrame;
|
||||
receiverVars = copy(otherObj.variables);
|
||||
receiverVars.parentFrame = rootVars;
|
||||
result.outerContext.variables.parentFrame = receiverVars;
|
||||
} else {
|
||||
result.outerContext.variables.parentFrame = otherObj.variables;
|
||||
}
|
||||
if (!result.outerContext) {
|
||||
result.outerContext = new Context();
|
||||
result.variables.parentFrame = result.outerContext.variables;
|
||||
}
|
||||
result.outerContext = copy(result.outerContext);
|
||||
result.outerContext.variables = copy(result.outerContext.variables);
|
||||
result.outerContext.receiver = otherObj;
|
||||
if (result.outerContext.variables.parentFrame) {
|
||||
rootVars = result.outerContext.variables.parentFrame;
|
||||
receiverVars = copy(otherObj.variables);
|
||||
receiverVars.parentFrame = rootVars;
|
||||
result.outerContext.variables.parentFrame = receiverVars;
|
||||
} else {
|
||||
result.outerContext.variables.parentFrame = otherObj.variables;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
|
Ładowanie…
Reference in New Issue