summaryrefslogtreecommitdiff
path: root/threads.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2014-01-09 15:34:12 +0100
committerjmoenig <jens@moenig.org>2014-01-09 15:36:16 +0100
commit8a1ca3116b834625e6f71c6376c115975d4f9d75 (patch)
treee827c2f916f1f7bde9c6f038282bd909a6916617 /threads.js
parent4139efc35f2d36ca9088351f8ac32de9c2d6d4d1 (diff)
downloadsnap-byow-8a1ca3116b834625e6f71c6376c115975d4f9d75.tar.gz
snap-byow-8a1ca3116b834625e6f71c6376c115975d4f9d75.zip
Collapse STOP primitives into a single block with a dropdown of options
Diffstat (limited to 'threads.js')
-rw-r--r--threads.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/threads.js b/threads.js
index 8c3eb25..79af3b9 100644
--- a/threads.js
+++ b/threads.js
@@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/
// Global stuff ////////////////////////////////////////////////////////
-modules.threads = '2014-January-08';
+modules.threads = '2014-January-09';
var ThreadManager;
var Process;
@@ -1372,12 +1372,27 @@ Process.prototype.doStopAll = function () {
}
};
+Process.prototype.doStopThis = function (choice) {
+ switch (this.inputOption(choice)) {
+ case 'all':
+ this.doStopAll();
+ break;
+ case 'this script':
+ this.doStop();
+ break;
+ case 'this block':
+ this.doStopBlock();
+ break;
+ default:
+ nop();
+ }
+};
+
Process.prototype.doStopOthers = function (choice) {
var stage;
if (this.homeContext.receiver) {
stage = this.homeContext.receiver.parentThatIsA(StageMorph);
if (stage) {
-
switch (this.inputOption(choice)) {
case 'all but this script':
stage.threads.stopAll(this);