From: Alan Knowles Date: Mon, 1 Nov 2010 03:26:49 +0000 (+0800) Subject: Sample/Editor.js X-Git-Url: http://git.roojs.org/?p=app.Builder.js;a=commitdiff_plain;h=8474bcfdf36aa545356c88a4afdfd7aa2bb77dc3 Sample/Editor.js --- diff --git a/Sample/Editor.js b/Sample/Editor.js index 82a603758..cfbd52440 100644 --- a/Sample/Editor.js +++ b/Sample/Editor.js @@ -14,7 +14,7 @@ Editor=new XObject({ xtype: Gtk.Window, listeners : { destroy_event : function (self, event) { - if (!this.get('/Editor.buffer').checkSyntax) { + if (!this.save()) { // no hiding with errors. return true; } @@ -22,7 +22,11 @@ Editor=new XObject({ return true; }, delete_event : function (self, event) { - this.el.hide(); + if (!this.save()) { + // no hiding with errors. + return true; + } + this.el.hide(); return true; }, configure_event : function (self, object) {