From 61dd479a2b5b79714cf9125d222fb7996674f1a7 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Wed, 30 Jul 2014 16:28:01 +0200 Subject: export script pic with result bubble hidden option in the shift-context-menu of reporter scripts --- threads.js | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'threads.js') diff --git a/threads.js b/threads.js index 4989a23..3324ac6 100644 --- a/threads.js +++ b/threads.js @@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/ // Global stuff //////////////////////////////////////////////////////// -modules.threads = '2014-July-28'; +modules.threads = '2014-July-30'; var ThreadManager; var Process; @@ -134,7 +134,11 @@ ThreadManager.prototype.toggleProcess = function (block) { } }; -ThreadManager.prototype.startProcess = function (block, isThreadSafe) { +ThreadManager.prototype.startProcess = function ( + block, + isThreadSafe, + exportResult +) { var active = this.findProcess(block), top = block.topBlock(), newProc; @@ -147,6 +151,7 @@ ThreadManager.prototype.startProcess = function (block, isThreadSafe) { } top.addHighlight(); newProc = new Process(block.topBlock()); + newProc.exportResult = exportResult; this.processes.push(newProc); return newProc; }; @@ -232,11 +237,17 @@ ThreadManager.prototype.removeTerminatedProcesses = function () { if (proc.topBlock instanceof ReporterBlockMorph) { if (proc.homeContext.inputs[0] instanceof List) { - proc.topBlock.showBubble(new ListWatcherMorph( - proc.homeContext.inputs[0] - )); + proc.topBlock.showBubble( + new ListWatcherMorph( + proc.homeContext.inputs[0] + ), + proc.exportResult + ); } else { - proc.topBlock.showBubble(proc.homeContext.inputs[0]); + proc.topBlock.showBubble( + proc.homeContext.inputs[0], + proc.exportResult + ); } } } else { @@ -302,6 +313,8 @@ ThreadManager.prototype.findProcess = function (block) { httpRequest active instance of an HttpRequest or null pauseOffset msecs between the start of an interpolated operation and when the process was paused + exportResult boolean flag indicating whether a picture of the top + block along with the result bubble shoud be exported */ Process.prototype = {}; @@ -325,6 +338,7 @@ function Process(topBlock) { this.isPaused = false; this.pauseOffset = null; this.frameCount = 0; + this.exportResult = false; if (topBlock) { this.homeContext.receiver = topBlock.receiver(); -- cgit v1.3.1