tools/build_gtk_tree.js
authorAlan Knowles <alan@roojs.com>
Fri, 10 Aug 2012 02:44:54 +0000 (10:44 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 10 Aug 2012 02:44:54 +0000 (10:44 +0800)
tools/build_gtk_tree.js

index 2c142b1..586c85c 100644 (file)
@@ -273,10 +273,12 @@ function BuildLists () {
     function verifyUsageMethod(parent,child,method)
     {
         // currently only verifies add on container.
     function verifyUsageMethod(parent,child,method)
     {
         // currently only verifies add on container.
-        if (method !='add') {
-            
+        if (method !='Gtk.Container:add') {
+            return true;
         }
         }
-        
+        var cls = parent.split('.').pop();
+        var x = new Gtk[cls]();
+        print(parent + " : says children are of type : " + x.child_type());
         
     }
     
         
     }
     
@@ -294,7 +296,7 @@ function BuildLists () {
                 continue;
                 
             }
                 continue;
                 
             }
-            if (verifyUsageMethod(parent,child,m[1])) {
+            if (verifyUsageMethod(parent,child,methods[i])) {
                 return true;
             }
         }
                 return true;
             }
         }