Fix #7286 - live testing issues
authorAlan <alan@roojs.com>
Wed, 29 Jun 2022 04:53:28 +0000 (12:53 +0800)
committerAlan <alan@roojs.com>
Wed, 29 Jun 2022 04:53:28 +0000 (12:53 +0800)
src/JsRender/NodeToVala.vala
src/Palete/Gir.vala

index 7073d51..29795d8 100644 (file)
@@ -496,7 +496,7 @@ public class JsRender.NodeToVala : Object {
                // is the wrapped element a struct?
                
                var ncls = Palete.Gir.factoryFqn((Project.Gtk) this.file.project, this.node.fqn());
-               if (ncls.nodetype == "Struct") {
+               if (ncls != null && ncls.nodetype == "Struct") {
                        // we can use regular setters to apply the values.
                        this.addLine(this.ipad + "this.el = " + this.cls + "();");
                        return;
index d653542..ad708ea 100644 (file)
@@ -185,17 +185,20 @@ namespace Palete {
                        var fqn = in_fqn;
                        // swap Gtk.Source* to GtkSource.
                        
-                       GLib.debug("Gir.facotryFqn  search %s", fqn);
+                       GLib.debug("Gir.factoryFqn  search %s", fqn);
                        var bits = fqn.split(".");
                        if (bits.length < 1) {
+                               GLib.debug("Gir.factoryFqn  fail - missing '.'");
                                return null;
                        }
                        
                        var f = (GirObject)factory(project , bits[0]);
 
                        if (bits.length == 1 || f ==null) {
+                               GLib.debug("Gir.factoryFqn  fail - factory failed to load NS");
                                return f;
                        }
+                       GLib.debug("Gir.factoryFqn  fetching child %s", fqn.substring(bits[0].length+1));
                        return f.fetchByFqn(fqn.substring(bits[0].length+1)); // since classes are stored in fqn format...?