made "When I am stopped" scripts atomic

so you can use loops in them without having to place them inside a WARP block.
upd4.2
jmoenig 2018-06-21 11:17:25 +02:00
rodzic 4c311eaaac
commit 6e6b8670fb
3 zmienionych plików z 11 dodań i 4 usunięć

Wyświetl plik

@ -4177,6 +4177,10 @@ in development:
* new "webcam snap" reporter in the "Pixels" library
* new "record" reporter in the "Audio Comp" library
180621
------
* Threads, Objects: made "When I am stopped" scripts atomic, so you can use loops
=== v4.2 major release (draft) ===

Wyświetl plik

@ -83,7 +83,7 @@ BlockEditorMorph, BlockDialogMorph, PrototypeHatBlockMorph, localize,
TableMorph, TableFrameMorph, normalizeCanvas, BooleanSlotMorph, HandleMorph,
AlignmentMorph, Process, XML_Element, VectorPaintEditorMorph*/
modules.objects = '2018-June-11';
modules.objects = '2018-June-21';
var SpriteMorph;
var StageMorph;
@ -4874,7 +4874,8 @@ SpriteMorph.prototype.receiveUserInteraction = function (
null, // export result
null, // callback
null, // is clicked
rightAway // immediately
rightAway, // immediately
interaction === 'stopped' // atomic
));
});
return procs;

Wyświetl plik

@ -62,7 +62,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy,
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph,
TableFrameMorph, ColorSlotMorph, isSnapObject*/
modules.threads = '2018-June-18';
modules.threads = '2018-June-21';
var ThreadManager;
var Process;
@ -205,7 +205,8 @@ ThreadManager.prototype.startProcess = function (
exportResult, // bool
callback,
isClicked,
rightAway
rightAway,
atomic // special option used (only) for "onStop" scripts
) {
var top = block.topBlock(),
active = this.findProcess(top, receiver),
@ -221,6 +222,7 @@ ThreadManager.prototype.startProcess = function (
newProc = new Process(top, receiver, callback, isClicked);
newProc.exportResult = exportResult;
newProc.isClicked = isClicked || false;
newProc.isAtomic = atomic || false;
// show a highlight around the running stack
// if there are more than one active processes