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

index 959b610..9218f31 100644 (file)
@@ -276,8 +276,19 @@ function BuildLists () {
     
     function verifyUsage(parent,child)
     {
-        
-        
+        // find all the methods that child can be added to parent.
+        var methods = methods[parent].can_contain_using;
+        for(var i =0;i<methods.length;i++) {
+            var m = methods[i].split(':');
+            if (!is_a(child,m[0])) {
+                continue;
+                
+            }
+            if (verifyUsageMethod(parent,child,m[1])) {
+                return true;
+            }
+        }
+        return false;
         
         
     }