<div dir="ltr"><div><div>I&#39;ll take a pass at it.&nbsp;</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">&lt;<a href="mailto:ptw@pobox.com">ptw@pobox.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">It&#39;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&#39;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, &quot;Henry Minsky&quot; &lt;<a href="mailto:hminsky@laszlosystems.com" target="_blank">hminsky@laszlosystems.com</a>&gt; 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&#39;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 = &nbsp;new LzLoader(this.sprite, { attachname: &#39;debugloader&#39; });<br>
<br>
in swf9, it needs to be<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;this.evalloader = new Loader();<br>
 &nbsp; &nbsp; &nbsp; &nbsp;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&#39;m not sure what the most expedient way to deal with this is.<br>
<br>
I was thinking maybe something like using the &lt;switch&gt; tag to conditionalize creating different code at the level of methods, but I still need some way to insert the &quot;import flash.xx.*;&quot; statements into the class declaration that gets generated. If I had the proposed &lt;passthrough&gt; tag, it might looks like<br>

<br>
&lt;class name=&quot;LzDebugWindow&quot; &gt;<br>
 &nbsp;&lt;switch&gt;<br>
 &nbsp; &nbsp;&lt;when runtime=&quot;swf9&quot;&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;passthrough context=&quot;class&quot;&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import flash.util.*;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import flash.events.*;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;/passthrough&gt;<br>
 &nbsp; &nbsp; &nbsp;&lt;method name=&quot;makeEvalLoader&quot;&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;debugloader = new Loader();<br>
 &nbsp; &nbsp; &nbsp; &nbsp;debugloader.contentLoaderInfo.addEventListener(Event.INIT, debugEvalListener);<br>
 &nbsp; &nbsp; &nbsp;&lt;/method&gt;<br>
 &nbsp; &nbsp; &nbsp;&lt;method name=&quot;debugEvalListener&quot; args=&quot;event:Event&quot;&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; ...<br>
 &nbsp; &nbsp; &nbsp;&lt;/method&gt;<br>
 &nbsp; &nbsp;&lt;/when&gt;<br>
 &nbsp; &nbsp;&lt;otherwise&gt;<br>
 &nbsp; &nbsp; &nbsp;&lt;method name=&quot;makeEvalLoader&quot;&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;return new LzLoader(this.sprite, { attachname: &#39;debugloader&#39; });<br>
 &nbsp; &nbsp; &nbsp;&lt;/method&gt;<br>
 &nbsp; &nbsp;&lt;/otherwise&gt;<br>
&lt;/switch&gt;<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&#39;d have a common file with<br>
<br>
 &nbsp; &nbsp;&lt;class name=&quot;LzBaseDebugWindow&quot;&gt;<br>
 &nbsp; &nbsp;...<br>
 &nbsp; &nbsp;&lt;/class&gt;<br>
<br>
and then make mutually exclusive swf8 and swf9 files which defined the<br>
runtime-specific methods. But I&#39;d still need this &lt;passthrough&gt; tag to<br>
get the import statements forced into the intermediate script code.<br>
<br>
&lt;library&gt;<br>
 &nbsp;&lt;switch&gt;<br>
 &nbsp; &nbsp;&lt;when runtime=&quot;swf8&quot;&gt;<br>
 &nbsp; &nbsp; &nbsp;&lt;include href=&quot;swf8debugger.lzx&quot;&gt;<br>
 &nbsp; &nbsp;&lt;/when&gt;<br>
 &nbsp; &nbsp;&lt;when runtime=&quot;dhtml&quot;&gt;<br>
 &nbsp; &nbsp; &lt;!-- no debugger component in dhtml --&gt;<br>
 &nbsp; &nbsp;&lt;/when&gt;<br>
 &nbsp; &nbsp;&lt;when runtime=&quot;swf9&quot;&gt;<br>
 &nbsp; &nbsp; &nbsp;&lt;include href=&quot;swf9debugger.lzx&quot;/&gt;<br>
 &nbsp; &nbsp;&lt;/otherwise&gt;<br>
 &nbsp;&lt;/switch&gt;<br>
&lt;/library&gt;<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>