kopia lustrzana https://github.com/backface/turtlestitch
fixed a regression conflict between "when I am stopped" and broadcasts
rodzic
03b1e5fe67
commit
62eedb85f9
4
gui.js
4
gui.js
|
@ -75,7 +75,7 @@ isRetinaSupported, SliderMorph, Animation, BoxMorph, MediaRecorder*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.gui = '2018-July-13';
|
||||
modules.gui = '2018-July-19';
|
||||
|
||||
// Declarations
|
||||
|
||||
|
@ -3513,7 +3513,7 @@ IDE_Morph.prototype.aboutSnap = function () {
|
|||
module, btn1, btn2, btn3, btn4, licenseBtn, translatorsBtn,
|
||||
world = this.world();
|
||||
|
||||
aboutTxt = 'Snap! 4.2.1.2\nBuild Your Own Blocks\n\n'
|
||||
aboutTxt = 'Snap! 4.2.1.3\nBuild Your Own Blocks\n\n'
|
||||
+ 'Copyright \u24B8 2018 Jens M\u00F6nig and '
|
||||
+ 'Brian Harvey\n'
|
||||
+ 'jens@moenig.org, bh@cs.berkeley.edu\n\n'
|
||||
|
|
|
@ -4293,5 +4293,12 @@ Fixes:
|
|||
* eliminated false "reporter didn't report" error messages
|
||||
|
||||
|
||||
180719
|
||||
------
|
||||
* Threads: fixed a regression conflict between "when I am stopped" and broadcasts
|
||||
|
||||
=== v4.2.1.3 maintenance release ===
|
||||
|
||||
|
||||
=== in development ===
|
||||
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Snap! Build Your Own Blocks 4.2.1.2</title>
|
||||
<title>Snap! Build Your Own Blocks 4.2.1.3</title>
|
||||
<link rel="shortcut icon" href="favicon.ico">
|
||||
<script type="text/javascript" src="morphic.js?version=2018-06-21"></script>
|
||||
<script type="text/javascript" src="widgets.js?version=2018-06-21"></script>
|
||||
<script type="text/javascript" src="blocks.js?version=2018-07-13"></script>
|
||||
<script type="text/javascript" src="threads.js?version=2018-07-12"></script>
|
||||
<script type="text/javascript" src="threads.js?version=2018-07-19"></script>
|
||||
<script type="text/javascript" src="objects.js?version=2018-07-06"></script>
|
||||
<script type="text/javascript" src="gui.js?version=2018-07-13"></script>
|
||||
<script type="text/javascript" src="gui.js?version=2018-07-19"></script>
|
||||
<script type="text/javascript" src="paint.js?version=2018-06-21"></script>
|
||||
<script type="text/javascript" src="lists.js?version=2018-06-21"></script>
|
||||
<script type="text/javascript" src="byob.js?version=2018-06-21"></script>
|
||||
|
|
|
@ -62,7 +62,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy,
|
|||
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph,
|
||||
TableFrameMorph, ColorSlotMorph, isSnapObject*/
|
||||
|
||||
modules.threads = '2018-July-12';
|
||||
modules.threads = '2018-July-19';
|
||||
|
||||
var ThreadManager;
|
||||
var Process;
|
||||
|
@ -217,6 +217,7 @@ ThreadManager.prototype.startProcess = function (
|
|||
return active;
|
||||
}
|
||||
active.stop();
|
||||
active.canBroadcast = true; // broadcasts to fire despite reentrancy
|
||||
this.removeTerminatedProcesses();
|
||||
}
|
||||
newProc = new Process(top, receiver, callback, isClicked);
|
||||
|
@ -528,6 +529,7 @@ ThreadManager.prototype.toggleSingleStepping = function () {
|
|||
invocations can catch them
|
||||
flashingContext for single stepping
|
||||
isInterrupted boolean, indicates intra-step flashing of blocks
|
||||
canBroadcast boolean, used to control reentrancy & "when stopped"
|
||||
*/
|
||||
|
||||
Process.prototype = {};
|
||||
|
@ -565,6 +567,7 @@ function Process(topBlock, receiver, onComplete, yieldFirst) {
|
|||
this.procedureCount = 0;
|
||||
this.flashingContext = null; // experimental, for single-stepping
|
||||
this.isInterrupted = false; // experimental, for single-stepping
|
||||
this.canBroadcast = true; // used to control "when I am stopped"
|
||||
|
||||
if (topBlock) {
|
||||
this.homeContext.variables.parentFrame =
|
||||
|
@ -648,6 +651,7 @@ Process.prototype.stop = function () {
|
|||
if (this.context) {
|
||||
this.context.stopMusic();
|
||||
}
|
||||
this.canBroadcast = false;
|
||||
};
|
||||
|
||||
Process.prototype.pause = function () {
|
||||
|
@ -2324,7 +2328,7 @@ Process.prototype.doBroadcast = function (message) {
|
|||
myself = this,
|
||||
procs = [];
|
||||
|
||||
if (this.readyToTerminate) {
|
||||
if (!this.canBroadcast) {
|
||||
return [];
|
||||
}
|
||||
if (message instanceof List && (message.length() === 2)) {
|
||||
|
|
Ładowanie…
Reference in New Issue