Allow JS-functions for invoke()

upd4.2
Jens Mönig 2018-02-12 11:08:58 +01:00
rodzic cdd6d3e06f
commit c7f3a0cd4d
2 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -3947,6 +3947,10 @@ Translation Updates:
* Store, GUI: small tweaks
* new Valencian Catalan translation, thanks, Jose A. Múrcia!!
180212
------
* Threads: Allow JS-functions for invoke()
=== v4.1.2 features ===

Wyświetl plik

@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy,
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph,
TableFrameMorph, ColorSlotMorph, isSnapObject*/
modules.threads = '2018-January-25';
modules.threads = '2018-February-12';
var ThreadManager;
var Process;
@ -151,6 +151,8 @@ function invoke(
);
} else if (action.evaluate) {
return action.evaluate();
} else if (action instanceof Function) {
return action.apply(receiver, contextArgs.asArray());
} else {
throw new Error('expecting a block or ring but getting ' + action);
}