Sample/Editor.js
[app.Builder.js] / Sample / Window.js
index 6e52da0..172a887 100644 (file)
@@ -1972,6 +1972,14 @@ Window=new XObject({
                                                                         
                                                                      //   this.activePath = false;
                                                                        // stop editing!!!!
+                                                                        if (this.get('/Editor').dirty) {
+                                                                            if (!this.get('/Editor.buffer').checkSyntax()) {
+                                                                               this.get('/StandardErrorDialog').show("Fix errors in code and save.."); 
+                                                                               return true;
+                                                                                // error Dialog
+                                                                            }
+                                                                            this.get('/Editor.view').save();
+                                                                        }   
                                                                         this.get('/LeftPanel').editableColumn.items[0].el.stop_editing();
                                                                         this.get('/LeftPanel').editing = false;