From d0878399fe0a85a05642a223dd4796badd212c5c Mon Sep 17 00:00:00 2001 From: jmoenig Date: Wed, 24 Apr 2013 15:11:27 +0200 Subject: Fine-tune multiple dialog instance handling prevent multiple block editors on the same block definition, allow multiple dialogs on different objects, handle dialog instances in DialogBoxMorph.prototype --- byob.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'byob.js') diff --git a/byob.js b/byob.js index ffcc349..1dc1f2b 100644 --- a/byob.js +++ b/byob.js @@ -105,7 +105,7 @@ CommentMorph, localize, CSlotMorph, SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.byob = '2013-April-23'; +modules.byob = '2013-April-24'; // Declarations @@ -1026,10 +1026,6 @@ BlockDialogMorph.prototype = new DialogBoxMorph(); BlockDialogMorph.prototype.constructor = BlockDialogMorph; BlockDialogMorph.uber = DialogBoxMorph.prototype; -// BlockDialogMorph constants: - -BlockDialogMorph.prototype.key = 'makeABlock'; - // BlockDialogMorph instance creation: function BlockDialogMorph(target, action, environment) { @@ -1053,6 +1049,8 @@ BlockDialogMorph.prototype.init = function (target, action, environment) { ); // override inherited properites: + this.key = 'makeABlock'; + this.types = new AlignmentMorph('row', this.padding); this.add(this.types); this.scopes = new AlignmentMorph('row', this.padding); @@ -1079,6 +1077,7 @@ BlockDialogMorph.prototype.openForChange = function ( preventTypeChange // ) { var clr = SpriteMorph.prototype.blockColor[category]; + this.key = 'changeABlock'; this.category = category; this.blockType = type; @@ -1481,6 +1480,7 @@ BlockEditorMorph.prototype.init = function (definition, target) { ); // override inherited properites: + this.key = 'editBlock' + definition.spec; this.labelString = 'Block Editor'; this.createLabel(); -- cgit v1.3.1