pull/3/merge
Jens Mönig 2015-03-25 14:03:06 +01:00
rodzic fdd2ecf7d9
commit 5bf3820ce1
2 zmienionych plików z 19 dodań i 6 usunięć

Wyświetl plik

@ -2476,3 +2476,7 @@ ______
------ ------
* Store: fixed #743 * Store: fixed #743
* GUI, html: switch from beta to release candidate * GUI, html: switch from beta to release candidate
150325
------
* Threads: fixed #752

Wyświetl plik

@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/
// Global stuff //////////////////////////////////////////////////////// // Global stuff ////////////////////////////////////////////////////////
modules.threads = '2015-February-28'; modules.threads = '2015-March-25';
var ThreadManager; var ThreadManager;
var Process; var Process;
@ -1153,13 +1153,16 @@ Process.prototype.doDeclareVariables = function (varNames) {
Process.prototype.doSetVar = function (varName, value) { Process.prototype.doSetVar = function (varName, value) {
var varFrame = this.context.variables, var varFrame = this.context.variables,
name = varName; name = varName;
if (name instanceof Context) { if (name instanceof Context) {
if (name.expression.selector === 'reportGetVar') { if (name.expression.selector === 'reportGetVar') {
name = name.expression.blockSpec; name.variables.setVar(
name.expression.blockSpec,
value
);
return;
} }
} }
varFrame.setVar(name, value); varFrame.setVar(name, value, this.blockReceiver());
}; };
Process.prototype.doChangeVar = function (varName, value) { Process.prototype.doChangeVar = function (varName, value) {
@ -1168,10 +1171,14 @@ Process.prototype.doChangeVar = function (varName, value) {
if (name instanceof Context) { if (name instanceof Context) {
if (name.expression.selector === 'reportGetVar') { if (name.expression.selector === 'reportGetVar') {
name = name.expression.blockSpec; name.variables.changeVar(
name.expression.blockSpec,
value
);
return;
} }
} }
varFrame.changeVar(name, value); varFrame.changeVar(name, value, this.blockReceiver());
}; };
Process.prototype.reportGetVar = function () { Process.prototype.reportGetVar = function () {
@ -1323,6 +1330,8 @@ Process.prototype.doDeleteFromList = function (index, list) {
} }
if (this.inputOption(index) === 'last') { if (this.inputOption(index) === 'last') {
idx = list.length(); idx = list.length();
} else if (isNaN(+this.inputOption(index))) {
return null;
} }
list.remove(idx); list.remove(idx);
}; };