From 8e90e240d7a33a4e3c68b06d1dfe87a9cee239f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20M=C3=B6nig?= Date: Sat, 9 Nov 2024 23:18:06 +0100 Subject: [PATCH] deprecated "expand (input) to (n) slots" command, because "set slot ... to ..." can now do this by passing a list as value --- HISTORY.md | 3 +++ snap.html | 2 +- src/objects.js | 8 ++++---- src/threads.js | 2 ++ 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 5189fefeb..bf4aaa210 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,9 +1,12 @@ # Snap! (BYOB) History ## in development: +* **Notable Changes:** + * deprecated "expand (input) to (n) slots" command, because "set slot ... to ..." can now do this by passing a list as value ### 2024-11-09 * threads: enhanced "set slot ... to ..." command to also handle variadic inputs, setting them to a list of values +* threads, objects: deprecated "expand (input) to (n) slots" command, because "set slot ... to ..." can now do this by passing a list as value ## 10.2.0: * **New Features:** diff --git a/snap.html b/snap.html index 26ba8ee9c..cfe69976a 100755 --- a/snap.html +++ b/snap.html @@ -18,7 +18,7 @@ - + diff --git a/src/objects.js b/src/objects.js index 50fa09107..11933490c 100644 --- a/src/objects.js +++ b/src/objects.js @@ -96,7 +96,7 @@ CustomBlockDefinition, exportEmbroidery*/ /*jshint esversion: 11*/ -modules.objects = '2024-November-07'; +modules.objects = '2024-November-09'; var SpriteMorph; var StageMorph; @@ -1367,7 +1367,7 @@ SpriteMorph.prototype.primitiveBlocks = function () { category: 'control', spec: 'set slot %inputSlot to %s' }, - doExpandSlot: { + doExpandSlot: { // deprecated, kept for backwards compatibility type: 'command', category: 'control', spec: 'expand %variadicSlot to %n slots' @@ -3738,7 +3738,7 @@ SpriteMorph.prototype.blockTemplates = function ( blocks.push(block('receiveMenuRequest')); blocks.push(block('receiveSlotEdit')); blocks.push(block('doSetSlot')); - blocks.push(block('doExpandSlot')); + // blocks.push(block('doExpandSlot')); // deprecated in v10.2.1 // for debugging: /////////////// if (devMode) { @@ -10918,7 +10918,7 @@ StageMorph.prototype.blockTemplates = function ( blocks.push(block('receiveMenuRequest')); blocks.push(block('receiveSlotEdit')); blocks.push(block('doSetSlot')); - blocks.push(block('doExpandSlot')); + // blocks.push(block('doExpandSlot')); // deprecated in v10.2.1 // for debugging: /////////////// if (this.world().isDevMode) { diff --git a/src/threads.js b/src/threads.js index b233d3fbd..eb70eb4c3 100644 --- a/src/threads.js +++ b/src/threads.js @@ -1763,6 +1763,8 @@ Process.prototype.doSetSlot = function(name, value) { }; Process.prototype.doExpandSlot = function(name, arity) { + // deprecated b/c superseded by doSetSlot(), + // kept for backwards compatibility with v10.2.0 var sym = Symbol.for('block'), frame, block, slot; if (!name) {return; }