From a0a4233ce1566169ef93c03183852a0ff7be2c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20M=C3=B6nig?= Date: Tue, 1 Mar 2022 18:16:01 +0100 Subject: [PATCH] added dev warning box --- HISTORY.md | 3 ++- snap.html | 2 +- src/gui.js | 33 ++++++++++++++++++++++++++++++++- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 5b4b5999..36172919 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -23,7 +23,8 @@ * blocks: removed scaffolding * threads: removed scaffolding * renamed help screens for addition and multiplication blocks -* removed now redundant variadic reporters from the variadic reporters library +* removed now redundant variadic reporters from the variadic reporters library +* added dev warning box ### 2022-02-28 * blocks, objects, threads, store: made addition reporter variadic diff --git a/snap.html b/snap.html index a18b2871..d42503b0 100755 --- a/snap.html +++ b/snap.html @@ -20,7 +20,7 @@ - + diff --git a/src/gui.js b/src/gui.js index db7abe11..943fdfc1 100644 --- a/src/gui.js +++ b/src/gui.js @@ -86,7 +86,7 @@ BlockVisibilityDialogMorph, ThreadManager*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2022-February-27'; +modules.gui = '2022-March-01'; // Declarations @@ -688,6 +688,7 @@ IDE_Morph.prototype.openIn = function (world) { world.keyboardFocus = this.stage; this.warnAboutIE(); + this.warnAboutDev(); }; // IDE_Morph construction @@ -7456,6 +7457,36 @@ IDE_Morph.prototype.isIE = function () { return ua.indexOf("MSIE ") > -1 || ua.indexOf("Trident/") > -1; }; +// IDE_Morph warn about saving project in the dev version + +IDE_Morph.prototype.warnAboutDev = function () { + var dlg, txt; + dlg = new DialogBoxMorph(); + txt = new TextMorph( + 'This version of Snap! is being developed.\n' + + '*** It is NOT supported for end users. ***\n' + + 'Saving a project in THIS version is likely to\n' + + 'make it UNUSABLE or DEFECTIVE for current and\n' + + 'even future official versions!', + dlg.fontSize, + dlg.fontStyle, + true, + false, + 'center', + null, + null, + MorphicPreferences.isFlat ? null : new Point(1, 1), + WHITE + ); + + dlg.key = 'Dev-Warning'; + dlg.labelString = "CAUTION! Development Version"; + dlg.createLabel(); + dlg.addBody(txt); + dlg.fixLayout(); + dlg.popUp(this.world()); +}; + // ProjectDialogMorph //////////////////////////////////////////////////// // ProjectDialogMorph inherits from DialogBoxMorph: