Sample/Window.bjs
[app.Builder.js] / Sample / Window.js
index fb94379..2fa4566 100644 (file)
@@ -1973,12 +1973,14 @@ Window=new XObject({
                                                                      //   this.activePath = false;
                                                                        // stop editing!!!!
                                                                         if (this.get('/Editor').dirty) {
-                                                                            if (!this.get('/Editor.view').checkSyntax()) {
-                                                                               this.get('/StandardErrorDialog').show("Fix errors in code and save.."); 
-                                                                               return;
-                                                                                // 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;
@@ -2287,7 +2289,9 @@ Window=new XObject({
                                                                         // make sure the pulldown is set correctly..
                                                                         // not really needed for second col...
                                                                         var showEditor = false;
-                                                                        
+                                                                        this.get('/Editor').activePath = false;
+                                                                        this.get('/Editor').el.hide();
+                                                                         
                                                                         if (col) {
                                                                             var provider = this.get('/LeftTree').getPaleteProvider();
                                                                             var type = this.get('/LeftPanel.model').getType(path);
@@ -2317,13 +2321,14 @@ Window=new XObject({
                                                                         }
                                                                         var _this = this;    
                                                                         // end editing..
-                                                                        this.get('/BottomPane').el.hide();
+                                                                       // this.get('/BottomPane').el.hide();
                                                                         //this.get('/RightEditor').el.hide();
-                                                                         this.get('/Editor').el.hide();
+                                                                         
                                                                         
                                                                         if (showEditor) {
                                                                     
                                                                             this.activePath = false;
+                                                                            
                                                                             _this.get('/Editor').el.show_all();
                                                                             GLib.timeout_add(0, 1, function() {
                                                                     
@@ -2332,8 +2337,7 @@ Window=new XObject({
                                                                                 
                                                                                 _this.get('/Editor.RightEditor.view').load( _this.getValue(path, 1) );
                                                                                 
-                                                                                //e.editing_done();
-                                                                                //e.remove_widget();
+                                                                                _this.get('/Editor').activePath = path;
                                                                                 _this.activePath = path ;
                                                                               
                                                                                 return false;