Sample/Window.bjs
authorAlan Knowles <alan@akbkhome.com>
Thu, 4 Nov 2010 03:18:32 +0000 (11:18 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 4 Nov 2010 03:18:32 +0000 (11:18 +0800)
Sample/Window.bjs

index c8f9318..7e1b091 100644 (file)
                                                                     ]
                                                                 },
                                                                 {
-                                                                    "|xns": "Gtk",
-                                                                    "xtype": "Button",
-                                                                    "pack": "add",
                                                                     "listeners": {
-                                                                        "button_press_event": "function (self, event) {\n    this.get('/MidPropTree.model').showData('events');\n    return false;\n}"
+                                                                        "button_press_event": "function (self, event) {\n    \n \tif (!this.get('/Editor').save()) {\n \t    // popup!! - click handled.. \n \t    return true;\n        }\n        this.get('/MidPropTree.model').showData('events');\n    return false;\n}"
                                                                     },
+                                                                    "pack": "add",
+                                                                    "xtype": "Button",
+                                                                    "|xns": "Gtk",
                                                                     "items": [
                                                                         {
                                                                             "|xns": "Gtk",