From 8a1ca3116b834625e6f71c6376c115975d4f9d75 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Thu, 9 Jan 2014 15:34:12 +0100 Subject: Collapse STOP primitives into a single block with a dropdown of options --- threads.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'threads.js') 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); -- cgit v1.3.1