diff options
| author | Gubolin <gubolin@fantasymail.de> | 2015-03-08 09:53:10 +0100 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2015-03-08 09:53:10 +0100 |
| commit | b6d846444e44d41842e253b7276cd590d7163349 (patch) | |
| tree | 38fe02cc9cc336f5126773b88624ff70706dd521 | |
| parent | 808076ff0f36d87a514a56de747f0c937624e75d (diff) | |
| parent | e906290f47face8f2f4cc318f5d11838fb8a3b0a (diff) | |
| download | snap-b6d846444e44d41842e253b7276cd590d7163349.tar.gz snap-b6d846444e44d41842e253b7276cd590d7163349.zip | |
Merge remote-tracking branch 'upstream/master' into development
| -rw-r--r-- | blocks.js | 28 | ||||
| -rwxr-xr-x | history.txt | 4 |
2 files changed, 30 insertions, 2 deletions
@@ -9,7 +9,7 @@ written by Jens Mönig jens@moenig.org - Copyright (C) 2014 by Jens Mönig + Copyright (C) 2015 by Jens Mönig This file is part of Snap!. @@ -155,7 +155,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph, Costume*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2015-February-28'; +modules.blocks = '2015-March-06'; var SyntaxElementMorph; @@ -382,9 +382,32 @@ SyntaxElementMorph.prototype.inputs = function () { return part instanceof SyntaxElementMorph; }); } + // this.debugCachedInputs(); return this.cachedInputs; }; +SyntaxElementMorph.prototype.debugCachedInputs = function () { + // private - only used for manually debugging inputs caching + var realInputs, i; + if (!isNil(this.cachedInputs)) { + realInputs = this.parts().filter(function (part) { + return part instanceof SyntaxElementMorph; + }); + } + if (this.cachedInputs.length !== realInputs.length) { + throw new Error('cached inputs size do not match: ' + + this.constructor.name); + } + for (i = 0; i < realInputs.length; i += 1) { + if (this.cachedInputs[i] !== realInputs[i]) { + throw new Error('cached input does not match ' + + this.constructor.name + + ' ' + + i); + } + } +}; + SyntaxElementMorph.prototype.allInputs = function () { // answer arguments and nested reporters of all children var myself = this; @@ -4635,6 +4658,7 @@ RingMorph.uber = ReporterBlockMorph.prototype; // RingMorph preferences settings: +RingMorph.prototype.isCachingInputs = false; // RingMorph.prototype.edge = 2; // RingMorph.prototype.rounding = 9; // RingMorph.prototype.alpha = 0.8; diff --git a/history.txt b/history.txt index 0f92071..d042af4 100755 --- a/history.txt +++ b/history.txt @@ -2462,3 +2462,7 @@ ______ 150302 ------ * BYOB: fixed #730 + +150306 +------ +* Blocks: fixed #736 |
