summaryrefslogtreecommitdiff
path: root/threads.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2014-07-30 16:28:01 +0200
committerjmoenig <jens@moenig.org>2014-07-30 16:28:01 +0200
commit61dd479a2b5b79714cf9125d222fb7996674f1a7 (patch)
tree008cc0e5e941741646e5e3934564f457d96003f7 /threads.js
parent9f7028dbf95262cde83a524abc59987736eb5d32 (diff)
downloadsnap-byow-61dd479a2b5b79714cf9125d222fb7996674f1a7.tar.gz
snap-byow-61dd479a2b5b79714cf9125d222fb7996674f1a7.zip
export script pic with result bubble
hidden option in the shift-context-menu of reporter scripts
Diffstat (limited to 'threads.js')
-rw-r--r--threads.js26
1 files changed, 20 insertions, 6 deletions
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();