Hmm, ideally I would like to, but it will take a day of someone's time to declare everything public that needs to be. <br><br><br><div class="gmail_quote">On Mon, May 5, 2008 at 6:23 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;">Ok, my simple attempt to do this really makes matters much worse, because now every LFC method _other_than_ toString cannot be overridden (at least until we address <a href="http://jira.openlaszlo.org/jira/browse/LPP-5934" target="_blank">http://jira.openlaszlo.org/jira/browse/LPP-5934</a>: 'declare public LFC methods and attributes as public').<br>
<br>
Still want to go forward with this plan?<div><div></div><div class="Wj3C7c"><br>
<br>
On 2008-05-05, at 00:19 EDT, Henry Minsky wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I think it would be fine to make all used-defined LZX methods be public. I<br>
don't think we need to<br>
make any of the 'internal' gensym'ed anonymous handler methods public or<br>
anything.<br>
<br>
<br>
<br>
On Sun, May 4, 2008 at 1:52 PM, P T Withington <<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;">
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<br>
does, for back-compatibility is put toString on Object.prototype. You can<br>
override that in your class by defining your own toString on your class<br>
prototype, but then you can't make super calls. If a class has a public<br>
toString method, AS3 will call that in preference to the Object.prototype<br>
function. But it has to be public. If you don't declare it public, you can<br>
call it directly in your code but `String(foo)` and `'' + foo` will not.<br>
<br>
<br>
On 2008-05-03, at 21:18 EDT, Henry Minsky wrote:<br>
<br>
lzpix is getting a similar issue when I try to compile it in swf9<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
org.openlaszlo.sc.CompilerError: line 107: Error: Incompatible override,<br>
in<br>
line: override function toString () {<br>
line 243: Error: Incompatible override, in line: override function<br>
toString<br>
() {<br>
line 126: Error: Incompatible override, in line: override function<br>
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>
The override us automatic, I think it is the public that is screwing<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
the<br>
test case. If toString is not public it won't be invoked by implicit<br>
string<br>
conversions. So I declared it public in my patch that Max was testing.<br>
But<br>
the test must override but not declare public. I'm pretty sure that is<br>
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<br>
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>
Well toString has to be a public override for it to work, so, I think<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
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>
<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>
Change 20080502-ptw-H by ptw@dueling-banjos.home on 2008-05-02<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
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>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
</blockquote>
<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<br>
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<br>
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>
/><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>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
</blockquote>
<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>
<br>
</blockquote>
--<br>
Regards,<br>
Max Carlson<br>
OpenLaszlo.org<br>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
--<br>
Henry Minsky<br>
Software Architect<br>
<<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>
<br>
</blockquote>
<br>
--<br>
Henry Minsky<br>
Software Architect<br>
<a href="mailto:hminsky@laszlosystems.com" target="_blank">hminsky@laszlosystems.com</a><br>
<br>
</blockquote>
<br>
<br>
</blockquote>
<br>
<br>
-- <br>
Henry Minsky<br>
Software Architect<br>
<a href="mailto:hminsky@laszlosystems.com" target="_blank">hminsky@laszlosystems.com</a><br>
</blockquote>
<br>
</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>