Changed src/Palete/Roo.vala
authorAlan <alan@roojs.com>
Wed, 6 Jul 2022 06:37:57 +0000 (14:37 +0800)
committerAlan <alan@roojs.com>
Wed, 6 Jul 2022 06:37:57 +0000 (14:37 +0800)
src/Palete/Roo.vala

index 737501e..4630fd5 100644 (file)
@@ -248,7 +248,7 @@ namespace Palete {
                                
                                
                                case JsRender.NodePropType.PROP:
-                                       return cls.props;
+                                       return  this.filterProps(cls.props);
                                case JsRender.NodePropType.LISTENER:
                                        return cls.signals;
                                case JsRender.NodePropType.METHOD:
@@ -268,6 +268,33 @@ namespace Palete {
 
                         
                }
+               
+               
+               public Gee.HashMap<string,GirObject>  filterProps(Gee.HashMap<string,GirObject> props)
+               {
+                       // we shold probably cache this??
+                       
+                       var outprops = new Gee.HashMap<string,GirObject>(); 
+                       
+                       foreach(var k in props.keys) {
+                               var val = props.get(k);
+                                
+                               if (!val.type.contains(".")) {
+                                       outprops.set(k,val);
+                                       continue;
+                               }
+                                
+                               // do nothing? - classes not allowed?
+                               
+                       }
+                       
+                       
+                       return outprops;
+               
+               
+               }
+               
+               
                public string[] getInheritsFor(string ename)
                {
                        string[] ret = {};