diff options
| author | Gubolin <gubolin@fantasymail.de> | 2015-03-08 09:54:57 +0100 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2015-03-08 09:54:57 +0100 |
| commit | 526a595c5e00f171eb814f063e58a6c18c5784d4 (patch) | |
| tree | 7043e1fe7a6d2434fc6e2072961948bb2c3e44dd /byob.js | |
| parent | 1ed98c27ff3c1a825e75783481a4e739fb610bdb (diff) | |
| parent | b6d846444e44d41842e253b7276cd590d7163349 (diff) | |
| download | snap-526a595c5e00f171eb814f063e58a6c18c5784d4.tar.gz snap-526a595c5e00f171eb814f063e58a6c18c5784d4.zip | |
Merge branch 'development' into gh-pages
Diffstat (limited to 'byob.js')
| -rw-r--r-- | byob.js | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -106,7 +106,7 @@ SymbolMorph, isNil*/ // Global stuff //////////////////////////////////////////////////////// -modules.byob = '2015-January-21'; +modules.byob = '2015-March-02'; // Declarations @@ -429,6 +429,7 @@ CustomCommandBlockMorph.prototype.refresh = function () { // find unnahmed upvars and label them // to their internal definition (default) + this.cachedInputs = null; this.inputs().forEach(function (inp, idx) { if (inp instanceof TemplateSlotMorph && inp.contents() === '\u2191') { inp.setContents(def.inputNames()[idx]); @@ -443,6 +444,7 @@ CustomCommandBlockMorph.prototype.restoreInputs = function (oldInputs) { myself = this; if (this.isPrototype) {return; } + this.cachedInputs = null; this.inputs().forEach(function (inp) { old = oldInputs[i]; if (old instanceof ReporterBlockMorph && @@ -460,6 +462,7 @@ CustomCommandBlockMorph.prototype.restoreInputs = function (oldInputs) { } i += 1; }); + this.cachedInputs = null; }; CustomCommandBlockMorph.prototype.refreshDefaults = function () { @@ -472,6 +475,7 @@ CustomCommandBlockMorph.prototype.refreshDefaults = function () { } idx += 1; }); + this.cachedInputs = null; }; CustomCommandBlockMorph.prototype.refreshPrototype = function () { @@ -924,6 +928,9 @@ CustomReporterBlockMorph.prototype.refresh = function () { if (!this.isPrototype) { this.isPredicate = (this.definition.type === 'predicate'); } + if (this.parent instanceof SyntaxElementMorph) { + this.parent.cachedInputs = null; + } this.drawNew(); }; @@ -1865,6 +1872,9 @@ BlockEditorMorph.prototype.context = function (prototypeHat) { if (topBlock === null) { return null; } + topBlock.allChildren().forEach(function (c) { + if (c instanceof BlockMorph) {c.cachedInputs = null; } + }); stackFrame = Process.prototype.reify.call( null, topBlock, @@ -2974,7 +2984,7 @@ InputSlotDialogMorph.prototype.editSlotOptions = function () { new DialogBoxMorph( myself, function (options) { - myself.fragment.options = options; + myself.fragment.options = options.trim(); }, myself ).promptCode( |
