From b36a358173fcf4f2a4a77a9c202d6dc0d6c1a7b8 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Fri, 14 Nov 2014 12:49:01 +0100 Subject: Fix reporting out of nested custom C-shaped blocks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit REPORT now reports to the nearest lexical element expecting an input (which may not be the block holding the REPORT statement, this lets you REPORT out of nested FOR loops). STOP THIS BLOCK behaves as it used to. If you’ve been using REPORT instead of STOP THIS BLOCK, you should migrate. --- store.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'store.js') diff --git a/store.js b/store.js index cb91139..bc24849 100644 --- a/store.js +++ b/store.js @@ -61,7 +61,7 @@ SyntaxElementMorph, Variable*/ // Global stuff //////////////////////////////////////////////////////// -modules.store = '2014-October-01'; +modules.store = '2014-November-14'; // XML_Serializer /////////////////////////////////////////////////////// @@ -1824,9 +1824,8 @@ Context.prototype.toXML = function (serializer) { return ''; } return serializer.format( - '%%' + + '%%' + '%%%', - this.isLambda ? ' lambda="lambda"' : '', this.inputs.reduce( function (xml, input) { return xml + serializer.format('$', input); -- cgit v1.3.1 From 2cee474cb676f9ad04d55cc25f8d3fc42c002cce Mon Sep 17 00:00:00 2001 From: jmoenig Date: Mon, 24 Nov 2014 11:08:12 +0100 Subject: Fixed #34 --- history.txt | 1 + store.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'store.js') diff --git a/history.txt b/history.txt index 819dcf0..2efc442 100755 --- a/history.txt +++ b/history.txt @@ -2348,3 +2348,4 @@ ______ * Objects: Fixed #416 * Objects: Fixed #372 * Threads: Fixed #644 +* Store: Fixed #34 diff --git a/store.js b/store.js index bc24849..3568809 100644 --- a/store.js +++ b/store.js @@ -61,7 +61,7 @@ SyntaxElementMorph, Variable*/ // Global stuff //////////////////////////////////////////////////////// -modules.store = '2014-November-14'; +modules.store = '2014-November-24'; // XML_Serializer /////////////////////////////////////////////////////// @@ -261,7 +261,9 @@ SnapSerializer.prototype.watcherLabels = { yPosition: 'y position', direction: 'direction', getScale: 'size', + getTempo: 'tempo', getLastAnswer: 'answer', + getLastMessage: 'message', getTimer: 'timer', getCostumeIdx: 'costume #', reportMouseX: 'mouse x', -- cgit v1.3.1 From 8338384bf572beb06ebd12a0c9af18029e99262a Mon Sep 17 00:00:00 2001 From: jmoenig Date: Sat, 6 Dec 2014 11:36:35 +0100 Subject: Fixed #668 --- history.txt | 4 ++++ store.js | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'store.js') diff --git a/history.txt b/history.txt index f1baa92..ff38bfb 100755 --- a/history.txt +++ b/history.txt @@ -2386,3 +2386,7 @@ ______ 141205 ------ * Morphic: Avoid auto-scaling artefacts in Safari on retina displays (resulting in “traces” when dragging items) + +141206 +------ +* Store: Fixed #668 diff --git a/store.js b/store.js index 3568809..7b2b7e1 100644 --- a/store.js +++ b/store.js @@ -61,7 +61,7 @@ SyntaxElementMorph, Variable*/ // Global stuff //////////////////////////////////////////////////////// -modules.store = '2014-November-24'; +modules.store = '2014-December-06'; // XML_Serializer /////////////////////////////////////////////////////// @@ -1201,6 +1201,10 @@ SnapSerializer.prototype.loadValue = function (model) { if (el) { v.outerContext = this.loadValue(el); } + if (v.outerContext && v.receiver && + !v.outerContext.variables.parentFrame) { + v.outerContext.variables.parentFrame = v.receiver.variables; + } return v; case 'costume': center = new Point(); -- cgit v1.3.1 From 777498a9f416a8a383e435d19a41f7bdae8ad048 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Wed, 17 Dec 2014 08:12:35 +0100 Subject: Experimental “processes” count watcher MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (hidden in dev mode) --- history.txt | 4 ++++ objects.js | 27 +++++++++++++++++++++++++-- store.js | 5 +++-- 3 files changed, 32 insertions(+), 4 deletions(-) (limited to 'store.js') diff --git a/history.txt b/history.txt index a7b88af..2f82c32 100755 --- a/history.txt +++ b/history.txt @@ -2398,3 +2398,7 @@ ______ 141215 ------ * New Swedish translation! Yay!! Thanks, Erik A Olsson! + +141217 +------ +* Objects, Store: Experimental “processes” count watcher (hidden in dev mode) diff --git a/objects.js b/objects.js index 7277719..b155b05 100644 --- a/objects.js +++ b/objects.js @@ -125,7 +125,7 @@ PrototypeHatBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.objects = '2014-December-04'; +modules.objects = '2014-December-17'; var SpriteMorph; var StageMorph; @@ -793,6 +793,12 @@ SpriteMorph.prototype.initBlocks = function () { category: 'sensing', spec: 'frames' }, + reportThreadCount: { + dev: true, + type: 'reporter', + category: 'sensing', + spec: 'processes' + }, doAsk: { type: 'command', category: 'sensing', @@ -1918,6 +1924,8 @@ SpriteMorph.prototype.blockTemplates = function (category) { txt.setColor(this.paletteTextColor); blocks.push(txt); blocks.push('-'); + blocks.push(watcherToggle('reportThreadCount')); + blocks.push(block('reportThreadCount')); blocks.push(block('colorFiltered')); blocks.push(block('reportStackSize')); blocks.push(block('reportFrameCount')); @@ -3579,6 +3587,16 @@ SpriteMorph.prototype.reportMouseY = function () { return 0; }; +// SpriteMorph thread count (for debugging) + +SpriteMorph.prototype.reportThreadCount = function () { + var stage = this.parentThatIsA(StageMorph); + if (stage) { + return stage.threads.processes.length; + } + return 0; +}; + // SpriteMorph variable watchers (for palette checkbox toggling) SpriteMorph.prototype.findVariableWatcher = function (varName) { @@ -5059,6 +5077,8 @@ StageMorph.prototype.blockTemplates = function (category) { txt.setColor(this.paletteTextColor); blocks.push(txt); blocks.push('-'); + blocks.push(watcherToggle('reportThreadCount')); + blocks.push(block('reportThreadCount')); blocks.push(block('colorFiltered')); blocks.push(block('reportStackSize')); blocks.push(block('reportFrameCount')); @@ -5509,6 +5529,9 @@ StageMorph.prototype.watcherFor = StageMorph.prototype.getLastAnswer = SpriteMorph.prototype.getLastAnswer; +StageMorph.prototype.reportThreadCount + = SpriteMorph.prototype.reportThreadCount; + // StageMorph message broadcasting StageMorph.prototype.allMessageNames @@ -6757,7 +6780,7 @@ WatcherMorph.prototype.object = function () { WatcherMorph.prototype.isGlobal = function (selector) { return contains( ['getLastAnswer', 'getLastMessage', 'getTempo', 'getTimer', - 'reportMouseX', 'reportMouseY'], + 'reportMouseX', 'reportMouseY', 'reportThreadCount'], selector ); }; diff --git a/store.js b/store.js index 7b2b7e1..8cbc10f 100644 --- a/store.js +++ b/store.js @@ -61,7 +61,7 @@ SyntaxElementMorph, Variable*/ // Global stuff //////////////////////////////////////////////////////// -modules.store = '2014-December-06'; +modules.store = '2014-December-17'; // XML_Serializer /////////////////////////////////////////////////////// @@ -267,7 +267,8 @@ SnapSerializer.prototype.watcherLabels = { getTimer: 'timer', getCostumeIdx: 'costume #', reportMouseX: 'mouse x', - reportMouseY: 'mouse y' + reportMouseY: 'mouse y', + reportThreadCount: 'processes' }; // SnapSerializer instance creation: -- cgit v1.3.1