From d115c6b51c8a2b40292a2b82bb93a4b3864a03ba Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 1 Nov 2010 14:11:36 +0800 Subject: [PATCH] Sample/Editor.js --- Sample/Editor.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Sample/Editor.js b/Sample/Editor.js index d37ff26e3..8c741ee26 100644 --- a/Sample/Editor.js +++ b/Sample/Editor.js @@ -18,6 +18,7 @@ Editor=new XObject({ // no hiding with errors. return true; } + this.get('/Editor').activePath = false; this.el.hide(); return true; }, @@ -27,6 +28,7 @@ Editor=new XObject({ return true; } this.el.hide(); + this.get('/Editor').activePath = false; return true; }, configure_event : function (self, object) { @@ -76,6 +78,11 @@ Editor=new XObject({ id : "RightEditor", pack : "add", save : function() { + // make sure we have an active path.. + if (!this.get('/Editor').activePath) { + return true; + } + var str = this.get('/Editor.buffer').toString(); if (!this.get('/Editor.buffer').checkSyntax()) { this.get('/StandardErrorDialog').show("Fix errors in code and save.."); -- 2.39.2