Sample/Window.js
authorAlan Knowles <alan@akbkhome.com>
Mon, 1 Nov 2010 03:24:03 +0000 (11:24 +0800)
committerAlan Knowles <alan@akbkhome.com>
Mon, 1 Nov 2010 03:24:03 +0000 (11:24 +0800)
Sample/Window.js

index 172a887..ee270cf 100644 (file)
@@ -1973,12 +1973,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
+                                                                            //if (!this.get('/Editor.buffer').checkSyntax()) {
+                                                                            //   this.get('/StandardErrorDialog').show("Fix errors in code and save.."); 
+                                                                            //   return true;
+                                                                            //    // error Dialog
+                                                                            //}
+                                                                            if (!this.get('/Editor.view').save()) {
+                                                                                return true;
                                                                             }
-                                                                            this.get('/Editor.view').save();
                                                                         }   
                                                                         this.get('/LeftPanel').editableColumn.items[0].el.stop_editing();
                                                                         this.get('/LeftPanel').editing = false;