diff --git a/HISTORY.md b/HISTORY.md index 0f08c7fc..0067719d 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,6 +2,12 @@ ## Development Version +## v4.2.1.4 +### 2018-09-09 +* new dev version +* Threads: fixed #2176 ('arguments' not found for calling empty multi-slots) +* Blocks: enabled drop-down for "inherit" command for clone-initialization scripts + ## v4.2.1.3 ### 2018-07-19 * Threads: fixed a regression conflict between "when I am stopped" and broadcasts diff --git a/blocks.js b/blocks.js index 1e1e0d79..fd9bfc7a 100644 --- a/blocks.js +++ b/blocks.js @@ -148,7 +148,7 @@ CustomCommandBlockMorph, SymbolMorph, ToggleButtonMorph, DialMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2018-July-13'; +modules.blocks = '2018-September-09'; var SyntaxElementMorph; var BlockMorph; @@ -8664,9 +8664,10 @@ InputSlotMorph.prototype.shadowedVariablesMenu = function () { if (!block) {return dict; } rcvr = block.scriptTarget(); - if (this.parentThatIsA(RingMorph)) { + if (this.parentThatIsA(RingMorph) || + this.topBlock().selector === 'receiveOnClone') { // show own local vars and attributes, because this is likely to be - // inside TELL, ASK or OF + // inside TELL, ASK or OF or when initializing a new clone vars = rcvr.variables.names(); vars.forEach(function (name) { dict[name] = name; diff --git a/gui.js b/gui.js index 38f2aacf..14805a0c 100644 --- a/gui.js +++ b/gui.js @@ -75,7 +75,7 @@ isRetinaSupported, SliderMorph, Animation, BoxMorph, MediaRecorder*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2018-July-19'; +modules.gui = '2018-September-09'; // 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.3\nBuild Your Own Blocks\n\n' + aboutTxt = 'Snap! 4.2.1.4\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' diff --git a/snap.html b/snap.html index 5e88040d..10037a9d 100755 --- a/snap.html +++ b/snap.html @@ -2,14 +2,14 @@ - Snap! Build Your Own Blocks 4.2.1.3 + Snap! Build Your Own Blocks 4.2.1.4 - - + + - + diff --git a/threads.js b/threads.js index a090a20b..16652a12 100644 --- a/threads.js +++ b/threads.js @@ -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-19'; +modules.threads = '2018-September-09'; var ThreadManager; var Process; @@ -1117,7 +1117,13 @@ Process.prototype.evaluate = function ( this.readyToYield = (Date.now() - this.lastYield > this.timeout); } - // assign parameters if any were passed + // assign arguments to parameters + + // assign the actual arguments list to the special + // parameter ID ['arguments'], to be used for variadic inputs + outer.variables.addVar(['arguments'], args); + + // assign arguments that are actually passed if (parms.length > 0) { // assign formal parameters @@ -1131,10 +1137,6 @@ Process.prototype.evaluate = function ( // assign implicit parameters if there are no formal ones if (context.inputs.length === 0) { - // assign the actual arguments list to the special - // parameter ID ['arguments'], to be used for variadic inputs - outer.variables.addVar(['arguments'], args); - // in case there is only one input // assign it to all empty slots if (parms.length === 1) { @@ -1215,7 +1217,13 @@ Process.prototype.initializeFor = function (context, args) { // remember the receiver this.context = context.receiver; - // assign parameters if any were passed + // assign arguments to parameters + + // assign the actual arguments list to the special + // parameter ID ['arguments'], to be used for variadic inputs + outer.variables.addVar(['arguments'], args); + + // assign arguments that are actually passed if (parms.length > 0) { // assign formal parameters @@ -1229,10 +1237,6 @@ Process.prototype.initializeFor = function (context, args) { // assign implicit parameters if there are no formal ones if (context.inputs.length === 0) { - // assign the actual arguments list to the special - // parameter ID ['arguments'], to be used for variadic inputs - outer.variables.addVar(['arguments'], args); - // in case there is only one input // assign it to all empty slots if (parms.length === 1) {