From 167a175d181dcfa7b20e453178425d3e0021db8f Mon Sep 17 00:00:00 2001 From: jmoenig Date: Tue, 9 Jul 2013 21:10:16 +0200 Subject: Codification changes, Boolean slot bug fix * Collapsed codification primitives (code, header) into a single block * Added isEmptySlot() to BooleanArgMorph (thanks, Brian, for the bug report!) --- blocks.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'blocks.js') diff --git a/blocks.js b/blocks.js index 35b073f..2280501 100644 --- a/blocks.js +++ b/blocks.js @@ -155,7 +155,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2013-July-05'; +modules.blocks = '2013-July-09'; var SyntaxElementMorph; var BlockMorph; @@ -1025,6 +1025,18 @@ SyntaxElementMorph.prototype.labelPart = function (spec) { true ); break; + case '%codeKind': + part = new InputSlotMorph( + null, + false, + { + code : ['code'], + header : ['header'] + }, + true + ); + part.setContents(['code']); + break; case '%l': part = new ArgMorph('list'); break; @@ -4900,7 +4912,6 @@ ArgMorph.prototype.isEmptySlot = function () { return this.type !== null; }; - // CommandSlotMorph //////////////////////////////////////////////////// /* @@ -7093,6 +7104,12 @@ BooleanSlotMorph.prototype.drawDiamond = function (context) { context.stroke(); }; +// BooleanSlotMorph implicit formal parameters: + +BooleanSlotMorph.prototype.isEmptySlot = function () { + return true; +}; + // ArrowMorph ////////////////////////////////////////////////////////// /* -- cgit v1.3.1