README.txt
[app.Builder.js] / XObject.js
index 390bab9..3155dba 100644 (file)
@@ -77,13 +77,16 @@ function XObject (cfg) {
     this.items = this.items || [];
     // pack can be false!
     if (typeof(this.pack) == 'undefined') {
-        var Gtk  = imports.gi.Gtk;
+        
         this.pack = [ 'add' ]
+        /*
+        var Gtk  = imports.gi.Gtk;
         switch (true) {
             // any others!!
             case (this.xtype == Gtk.MenuItem):  this.pack = [ 'append' ]; break;
             
         }
+        */
         
     }
     
@@ -190,6 +193,9 @@ XObject.prototype = {
             if (i == 'type') { // problem with Gtk.Window... - not decided on a better way to handle this.
                 continue;
             }
+            if (i == 'buttons') { // problem with Gtk.MessageDialog..
+                continue;
+            }
             this.el[i] = this.config[i];
         }
         
@@ -239,9 +245,7 @@ XObject.prototype = {
             imports.console.dump(item);
             Seed.quit();
         }
-        
-       
-       
+         
         
         if (item.pack===false) {  // no 
             return;
@@ -263,7 +267,7 @@ XObject.prototype = {
                 if (!isNaN(parseInt(e))) { args.push( parseInt(e)); return; }
                 args.push(e);
             });
-            print(args.join(","));
+            //print(args.join(","));
             
             pack_m = args.shift();
         } else {
@@ -273,7 +277,16 @@ XObject.prototype = {
         
         // handle error.
         if (pack_m && typeof(this.el[pack_m]) == 'undefined') {
-            Seed.print('pack method not available : ' + this.xtype + '.' +  pack_m);
+            
+            throw {
+                name: "ArgumentError", 
+                message : 'pack method not available : ' + this.id + " : " + this.xtype + '.' +  pack_m + " ADDING " + item.el
+                    
+            }
+           
+            
+            
+            
             return;
         }
         
@@ -301,7 +314,7 @@ XObject.prototype = {
     {
  
         if (XObject.debug) Seed.print("Add signal " + sig);
+        fn.id= sig;
         var _li = XObject.createDelegate(fn,this);
         // private listeners that are not copied to GTk.
         
@@ -597,6 +610,8 @@ XObject.extend(XObject,
     createDelegate : function(method, obj, args, appendArgs){
         
         return function() {
+            if (XObject.debug) print("CALL: " + obj.id + ':'+ method.id);
+            
             var callArgs = args || arguments;
             if(appendArgs === true){
                 callArgs = Array.prototype.slice.call(arguments, 0);