Declaring the methods public would have the nice effect of making the swf9 object introspection feature, such as it is,<br>actually be able to see them. <br><br><br><br><div class="gmail_quote">On Sun, May 4, 2008 at 1:52 PM, P T Withington &lt;<a href="mailto:ptw@pobox.com">ptw@pobox.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Should we just make all LZX methods public?<br>
<br>
I don&#39;t think we want to burden the LZX programmer with this issue.<br>
<br>
The other alternative is to shove toString into the prototype. &nbsp;What AS3 does, for back-compatibility is put toString on Object.prototype. &nbsp;You can override that in your class by defining your own toString on your class prototype, but then you can&#39;t make super calls. &nbsp;If a class has a public toString method, AS3 will call that in preference to the Object.prototype function. &nbsp;But it has to be public. &nbsp;If you don&#39;t declare it public, you can call it directly in your code but `String(foo)` and `&#39;&#39; + foo` will not.<div>
<div></div><div class="Wj3C7c"><br>
<br>
On 2008-05-03, at 21:18 EDT, Henry Minsky wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
lzpix is getting a similar issue when I try to compile it in swf9<br>
<br>
org.openlaszlo.sc.CompilerError: line 107: Error: Incompatible override, in<br>
line: override function toString () {<br>
line 243: Error: Incompatible override, in line: override function toString<br>
() {<br>
line 126: Error: Incompatible override, in line: override function toString<br>
() {<br>
<br>
<br>
On Fri, May 2, 2008 at 11:40 PM, P T Withington &lt;<a href="mailto:ptw@pobox.com" target="_blank">ptw@pobox.com</a>&gt; wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
The override us automatic, I think it is the public that is screwing the<br>
test case. If toString is not public it won&#39;t be invoked by implicit string<br>
conversions. So I declared it public in my patch that Max was testing. But<br>
the test must override but not declare public. I&#39;m pretty sure that is the<br>
conflict.<br>
<br>
<br>
On May 2, 2008, at 21:55, &quot;Henry Minsky&quot; &lt;<a href="mailto:hminsky@laszlosystems.com" target="_blank">hminsky@laszlosystems.com</a>&gt;<br>
wrote:<br>
<br>
Aren&#39;t the override keywords supposed to be inserted automatically ?<br>
Do we need to declare toString on something in the lfc.lzx schema file so<br>
that the compiler<br>
knows to insert an override?<br>
<br>
On Fri, May 2, 2008 at 5:18 PM, P T Withington &lt; &lt;<a href="mailto:ptw@pobox.com" target="_blank">ptw@pobox.com</a>&gt;<br>
<a href="mailto:ptw@pobox.com" target="_blank">ptw@pobox.com</a>&gt; wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Well toString has to be a public override for it to work, so, I think<br>
the example will have to be updated.<br>
<br>
<br>
On May 2, 2008, at 14:09, Max Carlson &lt; &lt;<a href="mailto:max@openlaszlo.org" target="_blank">max@openlaszlo.org</a>&gt;<br>
<a href="mailto:max@openlaszlo.org" target="_blank">max@openlaszlo.org</a>&gt; wrote:<br>
<br>
Your example works, but<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
&lt;<a href="http://localhost:8080/trunk/examples/modeexample.lzx?lzr=swf9" target="_blank">http://localhost:8080/trunk/examples/modeexample.lzx?lzr=swf9</a>&gt;<br>
<a href="http://localhost:8080/trunk/examples/modeexample.lzx?lzr=swf9" target="_blank">http://localhost:8080/trunk/examples/modeexample.lzx?lzr=swf9</a> now<br>
gives a compiler error:<br>
org.openlaszlo.sc.CompilerError: line 366: Error: Incompatible<br>
override, in line: override function toString () {<br>
<br>
P T Withington wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Change 20080502-ptw-H by ptw@dueling-banjos.home on 2008-05-02<br>
06:48:32 EDT<br>
&nbsp;in /Users/ptw/OpenLaszlo/ringding-2/WEB-INF/lps/lfc<br>
&nbsp;for &lt;<a href="http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc" target="_blank">http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc</a>&gt;<br>
<a href="http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc" target="_blank">http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc</a><br>
Summary: Make handler trampoline work in swf9<br>
Bugs Fixed:<br>
LPP-5818 &#39;Warn when methods registered for events aren&#39;t expecting<br>
exactly one argument from sendEvent()&#39;<br>
Technical Reviewer: hminsky (pending)<br>
QA Reviewer: max (pending)<br>
Details:<br>
&nbsp;LzFormattter: Type and default args for swf9, work around switch<br>
&nbsp;verifier error (must have break on final case).<br>
&nbsp;*: toString must be public to have it seen by string coercion<br>
Tests:<br>
&nbsp;This now runs in swf9, demonstrating that the wrapper to handle<br>
&nbsp;the missing argument is being installed.<br>
&nbsp;&lt;canvas&gt;<br>
 &nbsp; &lt;simplelayout /&gt;<br>
 &nbsp; &lt;text name=&quot;output&quot; clickable=&quot;true&quot; text=&quot;Click Me!&quot;/&gt;<br>
 &nbsp; &lt;method name=&quot;handleMe&quot;&gt;<br>
 &nbsp; &nbsp; output.format(&quot;Clicked!&quot;);<br>
 &nbsp; &lt;/method&gt;<br>
 &nbsp; &lt;handler name=&quot;onclick&quot; reference=&quot;output&quot; method=&quot;handleMe&quot; /&gt;<br>
&nbsp;&lt;/canvas&gt;<br>
Files:<br>
M &nbsp; &nbsp; &nbsp;kernel/swf/LzLibrary.lzs<br>
M &nbsp; &nbsp; &nbsp;kernel/dhtml/LzLibrary.js<br>
M &nbsp; &nbsp; &nbsp;services/LzURL.js<br>
M &nbsp; &nbsp; &nbsp;services/LzIdle.lzs<br>
M &nbsp; &nbsp; &nbsp;debugger/LzMemory.lzs<br>
M &nbsp; &nbsp; &nbsp;core/LzMiniNode.lzs<br>
M &nbsp; &nbsp; &nbsp;core/LzNode.lzs<br>
M &nbsp; &nbsp; &nbsp;views/LzText.lzs<br>
M &nbsp; &nbsp; &nbsp;views/LaszloCanvas.lzs<br>
M &nbsp; &nbsp; &nbsp;helpers/LzFont.lzs<br>
M &nbsp; &nbsp; &nbsp;helpers/LzSelectionManager.lzs<br>
M &nbsp; &nbsp; &nbsp;events/LaszloEvents.lzs<br>
M &nbsp; &nbsp; &nbsp;controllers/LzAnimatorGroup.lzs<br>
M &nbsp; &nbsp; &nbsp;controllers/LaszloLayout.lzs<br>
M &nbsp; &nbsp; &nbsp;controllers/LaszloAnimation.lzs<br>
M &nbsp; &nbsp; &nbsp;data/LzLazyReplicationManager.lzs<br>
M &nbsp; &nbsp; &nbsp;data/LzReplicationManager.lzs<br>
M &nbsp; &nbsp; &nbsp;data/LzDatapointer.lzs<br>
M &nbsp; &nbsp; &nbsp;data/LzDataText.lzs<br>
M &nbsp; &nbsp; &nbsp;data/LzDataElement.lzs<br>
M &nbsp; &nbsp; &nbsp;data/LzDataset.lzs<br>
M &nbsp; &nbsp; &nbsp;data/LzDatapath.lzs<br>
M &nbsp; &nbsp; &nbsp;data/LzResizeReplicationManager.lzs<br>
M &nbsp; &nbsp; &nbsp;data/LzParsedPath.lzs<br>
M &nbsp; &nbsp; &nbsp;data/LzParam.lzs<br>
M &nbsp; &nbsp; &nbsp;data/LzDataAttrBind.lzs<br>
M &nbsp; &nbsp; &nbsp;compiler/LzFormatter.lzs<br>
Changeset:<br>
&lt;<a href="http://svn.openlaszlo.org/openlaszlo/patches/20080502-ptw-H.tar" target="_blank">http://svn.openlaszlo.org/openlaszlo/patches/20080502-ptw-H.tar</a>&gt;<br>
<a href="http://svn.openlaszlo.org/openlaszlo/patches/20080502-ptw-H.tar" target="_blank">http://svn.openlaszlo.org/openlaszlo/patches/20080502-ptw-H.tar</a><br>
<br>
</blockquote>
<br>
--<br>
Regards,<br>
Max Carlson<br>
OpenLaszlo.org<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
<br>
--<br>
Henry Minsky<br>
Software Architect<br></div></div>
&lt;<a href="mailto:hminsky@laszlosystems.com" target="_blank">hminsky@laszlosystems.com</a>&gt;<a href="mailto:hminsky@laszlosystems.com" target="_blank">hminsky@laszlosystems.com</a><br>
<br>
<br>
</blockquote><div class="Ih2E3d">
<br>
<br>
-- <br>
Henry Minsky<br>
Software Architect<br>
<a href="mailto:hminsky@laszlosystems.com" target="_blank">hminsky@laszlosystems.com</a><br>
</div></blockquote>
<br>
</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>