From 7c2d505df997feddb78a76bf635d3078136440e4 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Fri, 21 Oct 2016 16:29:04 +0200 Subject: [PATCH] fixed #1422 --- history.txt | 4 ++++ threads.js | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/history.txt b/history.txt index 181ad16c..985a57af 100755 --- a/history.txt +++ b/history.txt @@ -3076,3 +3076,7 @@ http://snap.berkeley.edu/run#cloud:Username=jens&ProjectName=rotation 161020 ------ * Blocks: Tweak Keyboard-Entry + +161021 +------ +* Threads: Fixed #1422 diff --git a/threads.js b/threads.js index 422afffd..5d5baba5 100644 --- a/threads.js +++ b/threads.js @@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy, isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, TableFrameMorph, isSnapObject*/ -modules.threads = '2016-September-23'; +modules.threads = '2016-October-21'; var ThreadManager; var Process; @@ -1239,6 +1239,15 @@ Process.prototype.reportCallCC = function (aContext) { Process.prototype.runContinuation = function (aContext, args) { var parms = args.asArray(); + + // determine whether the continuations is to show the result + // in a value-balloon becuse the user has directly clicked on a reporter + if (aContext.expression === 'expectReport' && parms.length) { + this.stop(); + this.homeContext.inputs[0] = parms[0]; + return; + } + this.context.parentContext = aContext.copyForContinuationCall(); // passing parameter if any was passed if (parms.length === 1) { @@ -3422,6 +3431,7 @@ Process.prototype.unflash = function () { (if expression is a BlockMorph) pc the index of the next block to evaluate (if expression is an array) + isContinuation flag for marking a transient continuation context startTime time when the context was first evaluated startValue initial value for interpolated operations activeAudio audio buffer for interpolated operations, don't persist @@ -3450,6 +3460,7 @@ function Context( } this.inputs = []; this.pc = 0; + this.isContinuation = false; this.startTime = null; this.activeAudio = null; this.activeNote = null;