diff options
| author | Jens Mönig <jens@moenig.org> | 2015-03-25 14:03:06 +0100 |
|---|---|---|
| committer | Jens Mönig <jens@moenig.org> | 2015-03-25 14:03:06 +0100 |
| commit | 5bf3820ce190d2334187681fb384421c594f52ac (patch) | |
| tree | 5f646c76b251564cb955765a8a719a9925b33766 | |
| parent | fdd2ecf7d91d8026d3ca42c4bd52774877c72645 (diff) | |
| download | snap-5bf3820ce190d2334187681fb384421c594f52ac.tar.gz snap-5bf3820ce190d2334187681fb384421c594f52ac.zip | |
fixed #752 and #745
| -rwxr-xr-x | history.txt | 4 | ||||
| -rw-r--r-- | threads.js | 21 |
2 files changed, 19 insertions, 6 deletions
diff --git a/history.txt b/history.txt index b53e59c..e30cb00 100755 --- a/history.txt +++ b/history.txt @@ -2476,3 +2476,7 @@ ______ ------ * Store: fixed #743 * GUI, html: switch from beta to release candidate + +150325 +------ +* Threads: fixed #752 @@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/ // Global stuff //////////////////////////////////////////////////////// -modules.threads = '2015-February-28'; +modules.threads = '2015-March-25'; var ThreadManager; var Process; @@ -1153,13 +1153,16 @@ Process.prototype.doDeclareVariables = function (varNames) { Process.prototype.doSetVar = function (varName, value) { var varFrame = this.context.variables, name = varName; - if (name instanceof Context) { 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) { @@ -1168,10 +1171,14 @@ Process.prototype.doChangeVar = function (varName, value) { if (name instanceof Context) { 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 () { @@ -1323,6 +1330,8 @@ Process.prototype.doDeleteFromList = function (index, list) { } if (this.inputOption(index) === 'last') { idx = list.length(); + } else if (isNaN(+this.inputOption(index))) { + return null; } list.remove(idx); }; |
