FixBug.bjs
authorAlan Knowles <alan@akbkhome.com>
Wed, 30 Mar 2011 08:41:17 +0000 (16:41 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 30 Mar 2011 08:41:17 +0000 (16:41 +0800)
FixBug.bjs

index 9ec347d..d0ce97b 100644 (file)
                                     "|xns": "Gtk"
                                 },
                                 {
-                                    "|xns": "Gtk",
-                                    "xtype": "ComboBox",
-                                    "pack": "pack_end,true,true,3",
                                     "id": "xtype",
-                                    "|setValue": "function(v)\n                {\n                    var el = this.el;\n                    el.set_active(-1);\n                    this.get('model').data.forEach(function(n, ix) {\n                        if (v == n.xtype) {\n                            el.set_active(ix);\n                            return false;\n                        }\n                    });\n                }",
+                                    "pack": "pack_end,true,true,3",
+                                    "xtype": "ComboBox",
                                     "|getValue": "function() {\n     var ix = this.el.get_active();\n            if (ix < 0 ) {\n                return '';\n            }\n            return this.get('model').data[ix].xtype;\n}\n",
                                     "|init": "function() {\n    XObject.prototype.init.call(this);\n  this.el.add_attribute(this.items[0].el , 'markup', 1 );  \n}\n",
+                                    "|setValue": "function(v)\n                {\n                    var el = this.el;\n                    el.set_active(-1);\n                    this.get('model').data.forEach(function(n, ix) {\n                        if (v == n.xtype) {\n                            el.set_active(ix);\n                            return false;\n                        }\n                    });\n                }",
+                                    "|xns": "Gtk",
                                     "items": [
                                         {
                                             "|xns": "Gtk",