summaryrefslogtreecommitdiff
path: root/threads.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2014-07-24 12:24:19 +0200
committerjmoenig <jens@moenig.org>2014-07-24 12:24:19 +0200
commit54fec68d787f385f87683df5011bbcec8f0c3f77 (patch)
tree8d1105140d29aed53806b1dc73fa5ecdd9464be1 /threads.js
parent75d9adbfe26d0303f1986f3140307d2f196c73ec (diff)
downloadsnap-54fec68d787f385f87683df5011bbcec8f0c3f77.tar.gz
snap-54fec68d787f385f87683df5011bbcec8f0c3f77.zip
Display “empty” Contexts as empty rings
(e.g. continuations). Brian was complaining about empty continuations “sucking” up the watchers and value bubbles.
Diffstat (limited to 'threads.js')
-rw-r--r--threads.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/threads.js b/threads.js
index fccb2a3..06beebc 100644
--- a/threads.js
+++ b/threads.js
@@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/
// Global stuff ////////////////////////////////////////////////////////
-modules.threads = '2014-July-22';
+modules.threads = '2014-July-24';
var ThreadManager;
var Process;
@@ -2854,7 +2854,18 @@ Context.prototype.image = function () {
ring.embed(block, this.isContinuation ? [] : this.inputs);
return ring.fullImage();
}
- return newCanvas();
+
+ // otherwise show an empty ring
+ ring.color = SpriteMorph.prototype.blockColor.other;
+ ring.setSpec('%rc %ringparms');
+
+ // also show my inputs, unless I'm a continuation
+ if (!this.isContinuation) {
+ this.inputs.forEach(function (inp) {
+ ring.parts()[1].addInput(inp);
+ });
+ }
+ return ring.fullImage();
};
// Context continuations: