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 <<a href="mailto:ptw@pobox.com">ptw@pobox.com</a>> 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't think we want to burden the LZX programmer with this issue.<br>
<br>
The other alternative is to shove toString into the prototype. What AS3 does, for back-compatibility is put toString on Object.prototype. You can override that in your class by defining your own toString on your class prototype, but then you can't make super calls. If a class has a public toString method, AS3 will call that in preference to the Object.prototype function. But it has to be public. If you don't declare it public, you can call it directly in your code but `String(foo)` and `'' + 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 <<a href="mailto:ptw@pobox.com" target="_blank">ptw@pobox.com</a>> 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'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'm pretty sure that is the<br>
conflict.<br>
<br>
<br>
On May 2, 2008, at 21:55, "Henry Minsky" <<a href="mailto:hminsky@laszlosystems.com" target="_blank">hminsky@laszlosystems.com</a>><br>
wrote:<br>
<br>
Aren'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 < <<a href="mailto:ptw@pobox.com" target="_blank">ptw@pobox.com</a>><br>
<a href="mailto:ptw@pobox.com" target="_blank">ptw@pobox.com</a>> 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 < <<a href="mailto:max@openlaszlo.org" target="_blank">max@openlaszlo.org</a>><br>
<a href="mailto:max@openlaszlo.org" target="_blank">max@openlaszlo.org</a>> wrote:<br>
<br>
Your example works, but<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<<a href="http://localhost:8080/trunk/examples/modeexample.lzx?lzr=swf9" target="_blank">http://localhost:8080/trunk/examples/modeexample.lzx?lzr=swf9</a>><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>
in /Users/ptw/OpenLaszlo/ringding-2/WEB-INF/lps/lfc<br>
for <<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>
<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 'Warn when methods registered for events aren't expecting<br>
exactly one argument from sendEvent()'<br>
Technical Reviewer: hminsky (pending)<br>
QA Reviewer: max (pending)<br>
Details:<br>
LzFormattter: Type and default args for swf9, work around switch<br>
verifier error (must have break on final case).<br>
*: toString must be public to have it seen by string coercion<br>
Tests:<br>
This now runs in swf9, demonstrating that the wrapper to handle<br>
the missing argument is being installed.<br>
<canvas><br>
<simplelayout /><br>
<text name="output" clickable="true" text="Click Me!"/><br>
<method name="handleMe"><br>
output.format("Clicked!");<br>
</method><br>
<handler name="onclick" reference="output" method="handleMe" /><br>
</canvas><br>
Files:<br>
M kernel/swf/LzLibrary.lzs<br>
M kernel/dhtml/LzLibrary.js<br>
M services/LzURL.js<br>
M services/LzIdle.lzs<br>
M debugger/LzMemory.lzs<br>
M core/LzMiniNode.lzs<br>
M core/LzNode.lzs<br>
M views/LzText.lzs<br>
M views/LaszloCanvas.lzs<br>
M helpers/LzFont.lzs<br>
M helpers/LzSelectionManager.lzs<br>
M events/LaszloEvents.lzs<br>
M controllers/LzAnimatorGroup.lzs<br>
M controllers/LaszloLayout.lzs<br>
M controllers/LaszloAnimation.lzs<br>
M data/LzLazyReplicationManager.lzs<br>
M data/LzReplicationManager.lzs<br>
M data/LzDatapointer.lzs<br>
M data/LzDataText.lzs<br>
M data/LzDataElement.lzs<br>
M data/LzDataset.lzs<br>
M data/LzDatapath.lzs<br>
M data/LzResizeReplicationManager.lzs<br>
M data/LzParsedPath.lzs<br>
M data/LzParam.lzs<br>
M data/LzDataAttrBind.lzs<br>
M compiler/LzFormatter.lzs<br>
Changeset:<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>
<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>
<<a href="mailto:hminsky@laszlosystems.com" target="_blank">hminsky@laszlosystems.com</a>><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>