workaround for some REPORT / STOP BLOCK issues

enables reporting and stopping a bock from within a C-shaped slot in a
custom block, but not (yet) out of nested C-shaped custom blocks (but
that’s coming up, too)
pull/3/merge
jmoenig 2014-10-01 09:50:56 +02:00
rodzic ebbd0be87a
commit c6815c11d4
2 zmienionych plików z 7 dodań i 2 usunięć

Wyświetl plik

@ -2291,3 +2291,6 @@ ______
* Objects: fixed #378 (disable context menus for boolean representations)
* Blocks: fixed #584
140930
------
* Threads: workaround for some REPORT issues

Wyświetl plik

@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/
// Global stuff ////////////////////////////////////////////////////////
modules.threads = '2014-September-29';
modules.threads = '2014-October-01';
var ThreadManager;
var Process;
@ -955,7 +955,9 @@ Process.prototype.doReport = function (value, isCSlot) {
this.context.pc = this.context.expression.length - 1;
}
if (isCSlot) {
if (this.context.parentContext.expression instanceof Array) {
if (this.context &&
this.context.parentContext &&
this.context.parentContext.expression instanceof Array) {
this.popContext();
}
}