From e5e216ccf2fbefd66885436220109c2a703413c6 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Mon, 23 Feb 2015 14:55:30 +0100 Subject: Add user-interaction choices to the “When I am ...” hat block MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit “clicked”, “pressed”, “dropped”, “mouse-entered”, “mouse-departed” --- blocks.js | 16 +++++++++- help/receiveClick.png | Bin 49453 -> 0 bytes help/receiveInteraction.png | Bin 0 -> 49453 bytes objects.js | 74 +++++++++++++++++++++++++++++++++++++------- 4 files changed, 78 insertions(+), 12 deletions(-) delete mode 100644 help/receiveClick.png create mode 100644 help/receiveInteraction.png diff --git a/blocks.js b/blocks.js index e56d0ed..72aa5d0 100644 --- a/blocks.js +++ b/blocks.js @@ -155,7 +155,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph, Costume*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2014-November-21'; +modules.blocks = '2015-February-23'; var SyntaxElementMorph; @@ -848,6 +848,20 @@ SyntaxElementMorph.prototype.labelPart = function (spec) { true // read-only ); break; + case '%interaction': + part = new InputSlotMorph( + null, // text + false, // numeric? + { + 'clicked' : ['clicked'], + 'pressed' : ['pressed'], + 'dropped' : ['dropped'], + 'mouse-entered' : ['mouse-entered'], + 'mouse-departed' : ['mouse-departed'] + }, + true // read-only + ); + break; case '%dates': part = new InputSlotMorph( null, // text diff --git a/help/receiveClick.png b/help/receiveClick.png deleted file mode 100644 index 6ace2e3..0000000 Binary files a/help/receiveClick.png and /dev/null differ diff --git a/help/receiveInteraction.png b/help/receiveInteraction.png new file mode 100644 index 0000000..6ace2e3 Binary files /dev/null and b/help/receiveInteraction.png differ diff --git a/objects.js b/objects.js index b433a83..27d8964 100644 --- a/objects.js +++ b/objects.js @@ -125,7 +125,7 @@ PrototypeHatBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.objects = '2015-January-28'; +modules.objects = '2015-February-23'; var SpriteMorph; var StageMorph; @@ -581,11 +581,22 @@ SpriteMorph.prototype.initBlocks = function () { category: 'control', spec: 'when %keyHat key pressed' }, + + /* migrated to a newer block version: + receiveClick: { type: 'hat', category: 'control', spec: 'when I am clicked' }, + */ + + receiveInteraction: { + type: 'hat', + category: 'control', + spec: 'when I am %interaction', + defaults: ['clicked'] + }, receiveMessage: { type: 'hat', category: 'control', @@ -1205,6 +1216,10 @@ SpriteMorph.prototype.initBlockMigrations = function () { doStopBlock: { selector: 'doStopThis', inputs: [['this block']] + }, + receiveClick: { + selector: 'receiveInteraction', + inputs: [['I am clicked']] } }; }; @@ -1253,8 +1268,6 @@ SpriteMorph.prototype.blockAlternatives = { setSize: ['changeSize'], // control: - receiveGo: ['receiveClick'], - receiveClick: ['receiveGo'], doBroadcast: ['doBroadcastAndWait'], doBroadcastAndWait: ['doBroadcast'], doIf: ['doIfElse', 'doUntil'], @@ -1829,7 +1842,7 @@ SpriteMorph.prototype.blockTemplates = function (category) { blocks.push(block('receiveGo')); blocks.push(block('receiveKey')); - blocks.push(block('receiveClick')); + blocks.push(block('receiveInteraction')); blocks.push(block('receiveMessage')); blocks.push('-'); blocks.push(block('doBroadcast')); @@ -3169,6 +3182,7 @@ SpriteMorph.prototype.prepareToBeGrabbed = function (hand) { SpriteMorph.prototype.justDropped = function () { this.restoreLayers(); this.positionTalkBubble(); + this.receiveUserInteraction('dropped'); }; // SpriteMorph drawing: @@ -3500,9 +3514,6 @@ SpriteMorph.prototype.allHatBlocksFor = function (message) { if (morph.selector === 'receiveOnClone') { return message === '__clone__init__'; } - if (morph.selector === 'receiveClick') { - return message === '__click__'; - } } return false; }); @@ -3519,13 +3530,37 @@ SpriteMorph.prototype.allHatBlocksForKey = function (key) { }); }; +SpriteMorph.prototype.allHatBlocksForInteraction = function (interaction) { + return this.scripts.children.filter(function (morph) { + if (morph.selector) { + if (morph.selector === 'receiveInteraction') { + return morph.inputs()[0].evaluate()[0] === interaction; + } + } + return false; + }); +}; + // SpriteMorph events SpriteMorph.prototype.mouseClickLeft = function () { - var stage = this.parentThatIsA(StageMorph), - hats = this.allHatBlocksFor('__click__'), - procs = []; + return this.receiveUserInteraction('clicked'); +}; + +SpriteMorph.prototype.mouseEnter = function () { + return this.receiveUserInteraction('mouse-entered'); +}; + +SpriteMorph.prototype.mouseDownLeft = function () { + return this.receiveUserInteraction('pressed'); +}; +SpriteMorph.prototype.receiveUserInteraction = function (interaction) { + var stage = this.parentThatIsA(StageMorph), + procs = [], + hats; + if (!stage) {return; } // currently dragged + hats = this.allHatBlocksForInteraction(interaction); hats.forEach(function (block) { procs.push(stage.threads.startProcess(block, stage.isThreadSafe)); }); @@ -4190,6 +4225,7 @@ SpriteMorph.prototype.mouseEnterDragging = function () { }; SpriteMorph.prototype.mouseLeave = function () { + this.receiveUserInteraction('mouse-departed'); if (!this.enableNesting) {return; } this.removeHighlight(); }; @@ -5020,7 +5056,7 @@ StageMorph.prototype.blockTemplates = function (category) { blocks.push(block('receiveGo')); blocks.push(block('receiveKey')); - blocks.push(block('receiveClick')); + blocks.push(block('receiveInteraction')); blocks.push(block('receiveMessage')); blocks.push('-'); blocks.push(block('doBroadcast')); @@ -5574,11 +5610,27 @@ StageMorph.prototype.allHatBlocksFor StageMorph.prototype.allHatBlocksForKey = SpriteMorph.prototype.allHatBlocksForKey; +StageMorph.prototype.allHatBlocksForInteraction + = SpriteMorph.prototype.allHatBlocksForInteraction; + // StageMorph events StageMorph.prototype.mouseClickLeft = SpriteMorph.prototype.mouseClickLeft; +StageMorph.prototype.mouseEnter + = SpriteMorph.prototype.mouseEnter; + +StageMorph.prototype.mouseLeave = function () { + this.receiveUserInteraction('mouse-departed'); +}; + +StageMorph.prototype.mouseDownLeft + = SpriteMorph.prototype.mouseDownLeft; + +StageMorph.prototype.receiveUserInteraction + = SpriteMorph.prototype.receiveUserInteraction; + // StageMorph custom blocks StageMorph.prototype.deleteAllBlockInstances -- cgit v1.3.1 From e6dcf07b3de5cac657fc453d1da7814091a53500 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Mon, 23 Feb 2015 14:56:10 +0100 Subject: Update German translation --- gui.js | 6 +++--- history.txt | 5 +++++ lang-de.js | 21 ++++++++++++++++----- locale.js | 4 ++-- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/gui.js b/gui.js index c3104c5..9fddf4d 100644 --- a/gui.js +++ b/gui.js @@ -69,7 +69,7 @@ SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2015-February-20'; +modules.gui = '2015-February-23'; // Declarations @@ -2376,8 +2376,8 @@ IDE_Morph.prototype.projectMenu = function () { menu.addItem( 'Save to disk', 'saveProjectToDisk', - 'store this project\nin your downloads folder\n' - + '(not supported by all browsers)' + 'store this project\nin the downloads folder\n' + + '(in supporting browsers)' ); menu.addItem('Save As...', 'saveProjectsBrowser'); menu.addLine(); diff --git a/history.txt b/history.txt index e125b70..50464ee 100755 --- a/history.txt +++ b/history.txt @@ -2441,3 +2441,8 @@ ______ * Un-hide “Save to disk” feature (currently supported by both Chrome and Firefox, but not by Safari) * Update German translation * GUI: Make “project data in URLs” a hidden dev option (prevent long urls per default) + +150223 +------ +* Blocks, Objects: Add user-interaction choices to the “When I am ...” hat block +* Update German translation diff --git a/lang-de.js b/lang-de.js index 2a0dff7..3040cc2 100644 --- a/lang-de.js +++ b/lang-de.js @@ -185,7 +185,7 @@ SnapTranslator.dict.de = { 'translator_e-mail': 'jens@moenig.org', // optional 'last_changed': - '2015-02-20', // this, too, will appear in the Translators tab + '2015-02-23', // this, too, will appear in the Translators tab // GUI // control bar: @@ -417,8 +417,18 @@ SnapTranslator.dict.de = { 'Wenn %greenflag angeklickt', 'when %keyHat key pressed': 'Wenn Taste %keyHat gedr\u00fcckt', - 'when I am clicked': - 'Wenn ich angeklickt werde', + 'when I am %interaction': + 'Wenn ich %interaction werde', + 'clicked': + 'angeklickt', + 'pressed': + 'gedr\u00fcckt', + 'dropped': + 'abgestellt', + 'mouse-entered': + 'vom Mauszeiger betreten', + 'mouse-departed': + 'vom Mauszeiger verlassen', 'when I receive %msgHat': 'Wenn ich %msgHat empfange', 'broadcast %msg': @@ -649,8 +659,9 @@ SnapTranslator.dict.de = { 'Sichern', 'Save to disk': 'Abpeichern', - 'store this project\nin your downloads folder\n(not supported by all browsers)': - 'dieses Projekt herunterladen\nund lokal speichern\n(nicht von allen Browsern unters\u00fctzt)', + 'store this project\nin the downloads folder\n(in supporting browsers)': + 'dieses Projekt herunterladen\nund lokal speichern\n' + + '(nicht von allen Browsern unters\u00fctzt)', 'Save As...': 'Sichern als...', 'Import...': diff --git a/locale.js b/locale.js index af9ea6f..f6059d6 100644 --- a/locale.js +++ b/locale.js @@ -42,7 +42,7 @@ /*global modules, contains*/ -modules.locale = '2015-February-20'; +modules.locale = '2015-February-23'; // Global stuff @@ -149,7 +149,7 @@ SnapTranslator.dict.de = { 'translator_e-mail': 'jens@moenig.org', 'last_changed': - '2015-02-20' + '2015-02-23' }; SnapTranslator.dict.it = { -- cgit v1.3.1 From 1f88f65e9d9caf277dfedd5fe447e3cdcfd6cdf9 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Mon, 23 Feb 2015 15:15:46 +0100 Subject: Avoid incompatibility warning for very old (pre-earmarked) projects --- history.txt | 1 + store.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/history.txt b/history.txt index 50464ee..c73e5ff 100755 --- a/history.txt +++ b/history.txt @@ -2446,3 +2446,4 @@ ______ ------ * Blocks, Objects: Add user-interaction choices to the “When I am ...” hat block * Update German translation +* Store: Avoid incompatibility warning for very old (pre-earmarked) projects diff --git a/store.js b/store.js index 056767f..8adf7f7 100644 --- a/store.js +++ b/store.js @@ -61,7 +61,7 @@ SyntaxElementMorph, Variable*/ // Global stuff //////////////////////////////////////////////////////// -modules.store = '2015-January-21'; +modules.store = '2015-February-23'; // XML_Serializer /////////////////////////////////////////////////////// @@ -320,7 +320,7 @@ SnapSerializer.prototype.loadProjectModel = function (xmlNode, ide) { var appInfo = xmlNode.attributes.app, app = appInfo ? appInfo.split(' ')[0] : null; - if (ide && app !== this.app.split(' ')[0]) { + if (ide && app && app !== this.app.split(' ')[0]) { ide.inform( app + ' Project', 'This project has been created by a different app:\n\n' + -- cgit v1.3.1 From d3758bd707b2d1153b9b0079ba225b6432460ce9 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Mon, 23 Feb 2015 23:28:23 +0100 Subject: fix a bug in the automatic block migration mechanism Thanks, Josh, for telling me! --- objects.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/objects.js b/objects.js index 27d8964..552bf8e 100644 --- a/objects.js +++ b/objects.js @@ -1219,7 +1219,7 @@ SpriteMorph.prototype.initBlockMigrations = function () { }, receiveClick: { selector: 'receiveInteraction', - inputs: [['I am clicked']] + inputs: [['clicked']] } }; }; @@ -1602,7 +1602,7 @@ SpriteMorph.prototype.blockForSelector = function (selector, setDefaults) { : new ReporterBlockMorph(info.type === 'predicate'); block.color = this.blockColor[info.category]; block.category = info.category; - block.selector = selector; + block.selector = migration ? migration.selector : selector; if (contains(['reifyReporter', 'reifyPredicate'], block.selector)) { block.isStatic = true; } -- cgit v1.3.1 From 85388f19391aeb2d5ba87d36bbabace55ce842df Mon Sep 17 00:00:00 2001 From: Jens Mönig Date: Tue, 24 Feb 2015 06:47:12 +0100 Subject: fixed #725 --- history.txt | 4 ++++ store.js | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/history.txt b/history.txt index c73e5ff..7b0b6e5 100755 --- a/history.txt +++ b/history.txt @@ -2447,3 +2447,7 @@ ______ * Blocks, Objects: Add user-interaction choices to the “When I am ...” hat block * Update German translation * Store: Avoid incompatibility warning for very old (pre-earmarked) projects + +150224 +------ +* Store: fixed #725 diff --git a/store.js b/store.js index 8adf7f7..91ff40e 100644 --- a/store.js +++ b/store.js @@ -61,7 +61,7 @@ SyntaxElementMorph, Variable*/ // Global stuff //////////////////////////////////////////////////////// -modules.store = '2015-February-23'; +modules.store = '2015-February-24'; // XML_Serializer /////////////////////////////////////////////////////// @@ -977,7 +977,11 @@ SnapSerializer.prototype.loadBlock = function (model, isReporter) { ); } if (!receiver) { - return this.obsoleteBlock(isReporter); + if (!isGlobal) { + receiver = this.project.stage; + } else { + return this.obsoleteBlock(isReporter); + } } if (isGlobal) { info = detect(receiver.globalBlocks, function (block) { -- cgit v1.3.1 From ee88f7ad398fe9867ad1bcf1c2588704fc012151 Mon Sep 17 00:00:00 2001 From: Jens Mönig Date: Sat, 28 Feb 2015 05:44:59 -0800 Subject: Cache inputs - accelerate recursive reporters and warped / turbo recursive commands by up to 40% --- blocks.js | 29 ++++++++++++++++++++++++----- gui.js | 13 ++++++++++++- history.txt | 4 ++++ store.js | 3 ++- 4 files changed, 42 insertions(+), 7 deletions(-) diff --git a/blocks.js b/blocks.js index 72aa5d0..5cdcc1c 100644 --- a/blocks.js +++ b/blocks.js @@ -155,7 +155,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph, Costume*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2015-February-23'; +modules.blocks = '2015-February-28'; var SyntaxElementMorph; @@ -340,6 +340,7 @@ SyntaxElementMorph.prototype.setScale = function (num) { }; SyntaxElementMorph.prototype.setScale(1); +SyntaxElementMorph.prototype.isCachingInputs = true; // SyntaxElementMorph instance creation: @@ -356,6 +357,7 @@ SyntaxElementMorph.prototype.init = function () { SyntaxElementMorph.uber.init.call(this); this.defaults = []; + this.cachedInputs = null; }; // SyntaxElementMorph accessing: @@ -375,10 +377,12 @@ SyntaxElementMorph.prototype.parts = function () { SyntaxElementMorph.prototype.inputs = function () { // answer my arguments and nested reporters - return this.parts().filter(function (part) { - return part instanceof SyntaxElementMorph; - }); - + if (isNil(this.cachedInputs) || !this.isCachingInputs) { + this.cachedInputs = this.parts().filter(function (part) { + return part instanceof SyntaxElementMorph; + }); + } + return this.cachedInputs; }; SyntaxElementMorph.prototype.allInputs = function () { @@ -494,6 +498,7 @@ SyntaxElementMorph.prototype.replaceInput = function (oldArg, newArg) { replacement.drawNew(); this.fixLayout(); } + this.cachedInputs = null; this.endLayout(); }; @@ -529,6 +534,7 @@ SyntaxElementMorph.prototype.silentReplaceInput = function (oldArg, newArg) { replacement.drawNew(); this.fixLayout(); } + this.cachedInputs = null; }; SyntaxElementMorph.prototype.revertToDefaultInput = function (arg, noValues) { @@ -571,6 +577,7 @@ SyntaxElementMorph.prototype.revertToDefaultInput = function (arg, noValues) { } else if (deflt instanceof RingMorph) { deflt.fixBlockColor(); } + this.cachedInputs = null; }; SyntaxElementMorph.prototype.isLocked = function () { @@ -1942,6 +1949,7 @@ BlockMorph.prototype.init = function () { BlockMorph.uber.init.call(this); this.color = new Color(0, 17, 173); + this.cashedInputs = null; }; BlockMorph.prototype.receiver = function () { @@ -2047,6 +2055,7 @@ BlockMorph.prototype.setSpec = function (spec) { }); this.blockSpec = spec; this.fixLayout(); + this.cachedInputs = null; }; BlockMorph.prototype.buildSpec = function () { @@ -2439,6 +2448,7 @@ BlockMorph.prototype.restoreInputs = function (oldInputs) { } i += 1; }); + this.cachedInputs = null; }; BlockMorph.prototype.showHelp = function () { @@ -3034,6 +3044,7 @@ BlockMorph.prototype.fullCopy = function () { //block.comment = null; }); + ans.cachedInputs = null; return ans; }; @@ -9186,6 +9197,10 @@ MultiArgMorph.prototype = new ArgMorph(); MultiArgMorph.prototype.constructor = MultiArgMorph; MultiArgMorph.uber = ArgMorph.prototype; +// MultiArgMorph preferences settings + +MultiArgMorph.prototype.isCachingInputs = false; + // MultiArgMorph instance creation: function MultiArgMorph( @@ -9616,6 +9631,10 @@ ArgLabelMorph.prototype = new ArgMorph(); ArgLabelMorph.prototype.constructor = ArgLabelMorph; ArgLabelMorph.uber = ArgMorph.prototype; +// ArgLabelMorph preferences settings + +ArgLabelMorph.prototype.isCachingInputs = false; + // MultiArgMorph instance creation: function ArgLabelMorph(argMorph, labelTxt) { diff --git a/gui.js b/gui.js index 9fddf4d..75220b3 100644 --- a/gui.js +++ b/gui.js @@ -69,7 +69,7 @@ SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2015-February-23'; +modules.gui = '2015-February-28'; // Declarations @@ -2266,6 +2266,17 @@ IDE_Morph.prototype.settingsMenu = function () { 'uncheck to run scripts\nat normal speed', 'check to prioritize\nscript execution' ); + addPreference( + 'Cache Inputs', + function () { + SyntaxElementMorph.prototype.isCachingInputs = + !SyntaxElementMorph.prototype.isCachingInputs; + }, + SyntaxElementMorph.prototype.isCachingInputs, + 'uncheck to stop caching\ninputs (for debugging the evaluator)', + 'check to cache inputs\nboosts recursion', + true + ); addPreference( 'Rasterize SVGs', function () { diff --git a/history.txt b/history.txt index 7b0b6e5..1c33405 100755 --- a/history.txt +++ b/history.txt @@ -2451,3 +2451,7 @@ ______ 150224 ------ * Store: fixed #725 + +150228 +------ +* Blocks, Store, GUI: Cache inputs, accelerates evaluating recursive reporters and warped / turbo recursive commands by up to 40% diff --git a/store.js b/store.js index 91ff40e..b17fb49 100644 --- a/store.js +++ b/store.js @@ -61,7 +61,7 @@ SyntaxElementMorph, Variable*/ // Global stuff //////////////////////////////////////////////////////// -modules.store = '2015-February-24'; +modules.store = '2015-February-28'; // XML_Serializer /////////////////////////////////////////////////////// @@ -1027,6 +1027,7 @@ SnapSerializer.prototype.loadBlock = function (model, isReporter) { this.loadInput(child, inputs[i], block); } }, this); + block.cachedInputs = null; return block; }; -- cgit v1.3.1 From 58d8fd7ccd9843a743917408bf73da69485e7f3d Mon Sep 17 00:00:00 2001 From: Jens Mönig Date: Sat, 28 Feb 2015 05:49:07 -0800 Subject: slightly optimize warped / turbo execution --- history.txt | 1 + objects.js | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/history.txt b/history.txt index 1c33405..21d038c 100755 --- a/history.txt +++ b/history.txt @@ -2455,3 +2455,4 @@ ______ 150228 ------ * Blocks, Store, GUI: Cache inputs, accelerates evaluating recursive reporters and warped / turbo recursive commands by up to 40% +* Objects: slightly optimize warped / turbo execution diff --git a/objects.js b/objects.js index 552bf8e..1fe1309 100644 --- a/objects.js +++ b/objects.js @@ -125,7 +125,7 @@ PrototypeHatBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.objects = '2015-February-23'; +modules.objects = '2015-February-28'; var SpriteMorph; var StageMorph; @@ -1433,15 +1433,13 @@ SpriteMorph.prototype.setName = function (string) { SpriteMorph.prototype.drawNew = function () { var myself = this, - currentCenter = this.center(), + currentCenter, facing, // actual costume heading based on my rotation style isFlipped, - isLoadingCostume = this.costume && - typeof this.costume.loaded === 'function', + isLoadingCostume, cst, pic, // (flipped copy of) actual costume based on my rotation style - stageScale = this.parent instanceof StageMorph ? - this.parent.scale : 1, + stageScale, newX, corners = [], origin, @@ -1455,6 +1453,11 @@ SpriteMorph.prototype.drawNew = function () { this.wantsRedraw = true; return; } + currentCenter = this.center(); + isLoadingCostume = this.costume && + typeof this.costume.loaded === 'function'; + stageScale = this.parent instanceof StageMorph ? + this.parent.scale : 1; facing = this.rotationStyle ? this.heading : 90; if (this.rotationStyle === 2) { facing = 90; -- cgit v1.3.1 From e1a558a6739a59085e95161827662512a6d7fa78 Mon Sep 17 00:00:00 2001 From: Jens Mönig Date: Sat, 28 Feb 2015 05:58:34 -0800 Subject: fixed #715 --- history.txt | 3 ++- threads.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/history.txt b/history.txt index 21d038c..bc49af2 100755 --- a/history.txt +++ b/history.txt @@ -2455,4 +2455,5 @@ ______ 150228 ------ * Blocks, Store, GUI: Cache inputs, accelerates evaluating recursive reporters and warped / turbo recursive commands by up to 40% -* Objects: slightly optimize warped / turbo execution +* Objects: slightly optimize warped / turbo execution +* Threads: fixed #715 diff --git a/threads.js b/threads.js index e07059f..50af8dd 100644 --- a/threads.js +++ b/threads.js @@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/ // Global stuff //////////////////////////////////////////////////////// -modules.threads = '2015-January-12'; +modules.threads = '2015-February-28'; var ThreadManager; var Process; @@ -1926,7 +1926,7 @@ Process.prototype.reportTypeOf = function (thing) { if (thing === true || (thing === false)) { return 'Boolean'; } - if (!isNaN(parseFloat(thing))) { + if (!isNaN(+thing)) { return 'number'; } if (isString(thing)) { -- cgit v1.3.1 From b1d78532557371dfc740c078c76c13e8e0f66896 Mon Sep 17 00:00:00 2001 From: Jens Mönig Date: Sat, 28 Feb 2015 06:09:01 -0800 Subject: fixed #716 --- byob.js | 4 ++-- history.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/byob.js b/byob.js index ec714f1..634d62d 100644 --- a/byob.js +++ b/byob.js @@ -106,7 +106,7 @@ SymbolMorph, isNil*/ // Global stuff //////////////////////////////////////////////////////// -modules.byob = '2015-January-21'; +modules.byob = '2015-February-28'; // Declarations @@ -2974,7 +2974,7 @@ InputSlotDialogMorph.prototype.editSlotOptions = function () { new DialogBoxMorph( myself, function (options) { - myself.fragment.options = options; + myself.fragment.options = options.trim(); }, myself ).promptCode( diff --git a/history.txt b/history.txt index bc49af2..1f0ec00 100755 --- a/history.txt +++ b/history.txt @@ -2457,3 +2457,4 @@ ______ * Blocks, Store, GUI: Cache inputs, accelerates evaluating recursive reporters and warped / turbo recursive commands by up to 40% * Objects: slightly optimize warped / turbo execution * Threads: fixed #715 +* BYOB: fixed #716 -- cgit v1.3.1