Bug fix to issue #1131: make a block checks for text when 'OK' is clicked

dev
Ilay Raz 2016-05-24 17:11:56 -07:00
rodzic 7d268d63ac
commit 2fcd1709e9
1 zmienionych plików z 12 dodań i 0 usunięć

12
byob.js
Wyświetl plik

@ -1744,6 +1744,18 @@ BlockDialogMorph.prototype.fixLayout = function () {
}
};
BlockDialogMorph.prototype.accept = function () {
if (this.getInput().spec === '') {
new DialogBoxMorph().inform(
'No name',
'Please give a name to this block',
this.world()
);
} else {
BlockDialogMorph.uber.accept.call(this);
}
};
// BlockEditorMorph ////////////////////////////////////////////////////
// BlockEditorMorph inherits from DialogBoxMorph: