xtype: Gtk.Window,
listeners : {
destroy_event : function (self, event) {
+ if (!this.get('/Editor.buffer').checkSyntax) {
+ // no hiding with errors.
+ return true;
+ }
this.el.hide();
return true;
},
xtype: Gtk.Button,
listeners : {
clicked : function (self) {
+
this.get('/Editor.RightEditor').save();
}
},
id : "RightEditor",
pack : "add",
save : function() {
- var str = this.get('/Editor.buffer').toString();
+ var str = this.get('/Editor.buffer').toString();
+ if (!this.get('/Editor.buffer').checkSyntax()) {
+ this.get('/StandardErrorDialog').show("Fix errors in code and save..");
+ return false;
+ }
+
this.get('/LeftPanel.model').changed( str , false);
this.get('/Editor').dirty = false;
this.get('/Editor.save_button').el.sensitive = false;
+ return true;
},
items : [
{
},
save : function() {
- this.get('/Editor.RightEditor').save();
+ return this.get('/Editor.RightEditor').save();
},
show_line_numbers : true,
items : [