<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I'm looking at the generated code now.<div>There's a few things that pop out right away.</div><div><br class="webkit-block-placeholder"></div><div>1) we generate this:</div><div><br class="webkit-block-placeholder"></div><div><div>&nbsp;&nbsp; dynamic class $lzc$class_foobar extends $lzc$class_view {</div><div><br class="webkit-block-placeholder"></div><div>I'm guessing that this should be extends 'LzView' ?</div><div>That's what you need the LFC dictionary for?</div><div>So I changed the three occurrences of $lzc$class_view to LzView.</div><div><br class="webkit-block-placeholder"></div></div><div>2) it looks like there are some static stuff in the user class like this:</div><div><br class="webkit-block-placeholder"></div><div><div>static var tagname = "foobar";static var children = LzNode.mergeChildren([{attrs: {bgcolor: 16711000, height: 100, width: 100}, name: "view"}, {attrs: {bgcolor: 255, height: 150, width: 200, x: 175, y: 100}, name: "view"}], $lzc$class_view["children"]);static var attributes = new LzInheritedHash($lzc$class_view.attributes);</div><div><br class="webkit-block-placeholder"></div><div>Is there some what that the name "foobar" gets registered to the application to know about this class?</div><div>Is it some side effect of this static code? (if so, we need a way to get the class initialized).</div><div>But I don't see the string "foobar" anywhere, except in the tagname.</div><div><br class="webkit-block-placeholder"></div><div>After all, the main code has this:</div><div><div>&nbsp;&nbsp;LzInstantiateView({attrs: {x: 100}, name: "foobar"}, 3);</div><div><br class="webkit-block-placeholder"></div><div>So it's got to find the name "foobar" someplace?</div><div><br></div><div>3) there are compilation errors in $lzc$class_foobar.as, and we don't see them because</div><div>$lzc$class_foobar is never referenced anywhere. &nbsp;My temporary workaround was to insert</div><div>a dummy function in $lzc$class_foobar:</div><div><br class="webkit-block-placeholder"></div><div><div>&nbsp;&nbsp; static function $init$() { }</div><div><br class="webkit-block-placeholder"></div><div>And insert code into the LzApplication's constuctor():</div><div><br class="webkit-block-placeholder"></div><div><div>&nbsp;&nbsp; $lzc$class_foobar.$init$();</div><div><br class="webkit-block-placeholder"></div><div>(This is all done manually for debugging).</div><div><br class="webkit-block-placeholder"></div><div>Now when I compile I start getting errors:</div><div><br class="webkit-block-placeholder"></div><div><div>/Users/clients/laszlo/lib/jakarta-tomcat-5.0.30/temp/lzswf9/lzgen23563/$lzc$class_foobar.as(6): col: 89 Error: Type was not found or was not a compile-time constant: boolean.</div><div><br class="webkit-block-placeholder"></div><div>function $lzc$class_foobar (parent:LzNode, attrs:Object, children:Object? = null, async:boolean = null)&nbsp;</div></div></div><div><br class="webkit-block-placeholder"></div><div>So boolean = null should be Boolean = false &nbsp;(is this something generated by tag compiler?)</div><div><br class="webkit-block-placeholder"></div><div>4) fixing that gets a clean compile, but same behavior (blank canvas).</div><div>I suspect it's something to do with 2) above - somehow we need</div><div>to register the 'foobar' class so it can be instantiated at runtime as needed.</div><div><br class="webkit-block-placeholder"></div><div>Henry - I think these issues need your expertise, but if there's something</div><div>I can assist with, shout. &nbsp;BTW, my cell is 617-306-2057, feel free to call.</div><div>I'll be reading email too.</div><div><br class="webkit-block-placeholder"></div><div>- Don</div><div><br class="webkit-block-placeholder"></div></div><div><br class="webkit-block-placeholder"></div></div></div><div><div><br><div><div>On Mar 27, 2008, at 1:20 PM, Henry Minsky wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">with this test case<br><br>&lt;canvas width="1000" height="600" bgcolor="#eeeeff"&gt; <br>&nbsp; &lt;class name="foobar" &gt;<br>&nbsp;&nbsp;&nbsp; &lt;view width="50" height="50" bgcolor='red'/&gt;<br> &nbsp;&nbsp;&nbsp; &lt;view y="50" x="75" width="100" height="50" bgcolor='blue'/&gt;<br>&nbsp; &lt;/class&gt;<br><br>&nbsp; &lt;foobar x="100"/&gt;<br>&nbsp; &lt;foobar x="200" y="200"/&gt;<br> &nbsp; &lt;foobar x="300" y="400"/&gt;<br><br><br>&lt;/canvas&gt;<br><br>I get this compiler error in swf9<br><br>lzc --runtime=swf9 hello-classes.lzx<br>Compiling: hello-classes.lzx to hello-classes.lzr=swf9.swf<br> Compilation errors occurred:<br>: org.openlaszlo.sc.CompilerError: $lzc$class_foobar: class or mixin name may conflict with internally generated names<br>badtzmaru:swf9 hqm$ <br><br clear="all"><br>-- <br>Henry Minsky<br> Software Architect<br><a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br><br></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br class="Apple-interchange-newline">--</div><div><br class="webkit-block-placeholder"></div><div>Don Anderson</div><div>Java/C/C++, Berkeley DB, systems consultant</div><div><br class="webkit-block-placeholder"></div><div>voice: 617-547-7881</div><div>email:&nbsp;<a href="mailto:dda@ddanderson.com">dda@ddanderson.com</a></div><div>www: <a href="http://www.ddanderson.com">http://www.ddanderson.com</a></div><div><br class="webkit-block-placeholder"></div></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline"> </div><br></div></div></body></html>