<div dir="ltr"><div><div>I'll take a pass at it. </div><div><br></div><div><br><br><div class="gmail_quote">On Sun, Sep 14, 2008 at 5:44 PM, P T Withington <span dir="ltr"><<a href="mailto:ptw@pobox.com">ptw@pobox.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">It's petty clear to me that we need to bring passthrough technology up to the LZX level. Max already filed a request... I think it's up to you or I to just do it.<div>
<div></div><div class="Wj3C7c"><br>
<br>
On Sep 14, 2008, at 1:32 AM, "Henry Minsky" <<a href="mailto:hminsky@laszlosystems.com" target="_blank">hminsky@laszlosystems.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
To expand on this, I'm working on the debugger GUI component now, and it almost compiles in swf9, except that I need some lines of runtime-specific code to instantiate a loader class for doing eval() requests to the server.<br>
<br>
In swf8, the code is<br>
<br>
this.evalloader = new LzLoader(this.sprite, { attachname: 'debugloader' });<br>
<br>
in swf9, it needs to be<br>
<br>
this.evalloader = new Loader();<br>
this.evalloader.contentLoaderInfo.addEventListener(Event.INIT, debugEvalListener);<br>
<br>
LzLoader is an internal swf8 kernel class, while Loader and Event.INIT are as3<br>
library classes.<br>
<br>
So I'm not sure what the most expedient way to deal with this is.<br>
<br>
I was thinking maybe something like using the <switch> tag to conditionalize creating different code at the level of methods, but I still need some way to insert the "import flash.xx.*;" statements into the class declaration that gets generated. If I had the proposed <passthrough> tag, it might looks like<br>
<br>
<class name="LzDebugWindow" ><br>
<switch><br>
<when runtime="swf9"><br>
<passthrough context="class"><br>
import flash.util.*;<br>
import flash.events.*;<br>
</passthrough><br>
<method name="makeEvalLoader"><br>
debugloader = new Loader();<br>
debugloader.contentLoaderInfo.addEventListener(Event.INIT, debugEvalListener);<br>
</method><br>
<method name="debugEvalListener" args="event:Event"><br>
...<br>
</method><br>
</when><br>
<otherwise><br>
<method name="makeEvalLoader"><br>
return new LzLoader(this.sprite, { attachname: 'debugloader' });<br>
</method><br>
</otherwise><br>
</switch><br>
<br>
<br>
<br>
In this case, it might or might not be better to structure the<br>
LzDebugWindow as an abstract base class with everything except the<br>
runtime-specific methods, and then have the debugger/Library.lzs<br>
include a runtime-specific final class which would define those<br>
methods, so I'd have a common file with<br>
<br>
<class name="LzBaseDebugWindow"><br>
...<br>
</class><br>
<br>
and then make mutually exclusive swf8 and swf9 files which defined the<br>
runtime-specific methods. But I'd still need this <passthrough> tag to<br>
get the import statements forced into the intermediate script code.<br>
<br>
<library><br>
<switch><br>
<when runtime="swf8"><br>
<include href="swf8debugger.lzx"><br>
</when><br>
<when runtime="dhtml"><br>
<!-- no debugger component in dhtml --><br>
</when><br>
<when runtime="swf9"><br>
<include href="swf9debugger.lzx"/><br>
</otherwise><br>
</switch><br>
</library><br>
<br>
<br>
<br>
</blockquote>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br><br><br>
</div></div></div>