<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Sebastian,<div><br></div><div>I'll let others answer about future plans. &nbsp;As for this script, we are following</div><div>your #1, we know all the class names in the laszlo libraries, and we augment</div><div>that list by the classes declared in the input files. &nbsp;Everything else, including</div><div>Object, Array, ... as well as flash.display.* will be untouched.</div><div><br></div><div>At the moment, this is an additional tool to aid in conversion.</div><div><br></div><div>- Don</div><div><br><div><div>On Jun 30, 2008, at 6:42 PM, Sebastian Wagner wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">hi,<br><br>what will be the flow in the future?<br>1) checking for all available classname's and then replace only in case of a match $something with lz.$something<br>2) or replace all new $something with lz.$something except&nbsp; Object, Array, String, Number, or Boolean<br> <br>There are many more cases then&nbsp; Object, Array, String, Number, or Boolean if you go into SWF Runtime, for exmple all the new Filters of SWF8 look like:<br>new flash.display.DropShadowFilter()<br><br>This Script will be part of the OpenLaszlo Compiler or as an additional Tool?<br> <br><br>sebastian<br><br><div class="gmail_quote">2008/7/1 Donald Anderson &lt;<a href="mailto:dda@ddanderson.com">dda@ddanderson.com</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div style="">Here's the perl script (attached). &nbsp;I tried to upload it to the&nbsp;Runtime_Differences page,<div>but it looks like I can only update .gif/.jpeg files. &nbsp;Any advice about where to put it?</div><div><br></div> <div>I think I got all the cases:</div><div><br></div><div><div class="Ih2E3d"><div>- &nbsp; if the class name already has lz. , no change</div><div><br></div></div><div>- &nbsp; if the class name is a class defined in the input, then add lz. (?) &nbsp;[requires two passes]</div> <div class="Ih2E3d"><div><br></div><div>- &nbsp; if&nbsp;the&nbsp;class&nbsp;name&nbsp;is class for a LFC&nbsp;tagname,&nbsp;convert&nbsp;it&nbsp;to tagname and add lz. &nbsp;(new LzView => lz.view)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;I coded my list from&nbsp;WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java</div> <div><br></div></div><div>- &nbsp; if the class name is a known laszlo class, then add lz.</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;I have a fixed list embedded in the script, generated via find WEB-INF/lps | xargs grep class</div><div><br></div><div> - &nbsp; new global[*] is converted to new lz[*]</div><div class="Ih2E3d"><div><br></div><div>- &nbsp; otherwise, no change (this includes Object, Array, ...).</div></div></div><div><br></div><div>Let&nbsp;me&nbsp;know&nbsp;if there are any changes, should be easy to modify.</div> <div>Script includes a testcase to try all these situations.</div><div><br></div><div>- Don</div><div><br></div><div></div></div><br><div style=""><div></div><div><br><div><div>On Jun 30, 2008, at 3:01 PM, P T Withington wrote:</div> <br><blockquote type="cite"><div>One flaw in thus idea: &nbsp;many times the argument to new will be a parameter of the class, so you have to skip all the class attributes too. That may make searching for only the defined class names a better choice of algorithm.<br> <br>On Jun 30, 2008, at 13:59, P T Withington &lt;<a href="mailto:ptw@pobox.com" target="_blank">ptw@pobox.com</a>> wrote:<br><br><blockquote type="cite">The only 'native' classes that you might say `new *` or `x instanceof *` about are:<br> </blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> Object, Array, String, Number, or Boolean.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">So we should be able to add to the conversion script that if you see `new *` or `x instanceof *` and * does not start with lz. and is not one of the five native classes above, you should rewrite it to lz.*.<br> </blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">We also need to cover the case `new global[*]` needs to become `new lz[*]`.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> Icing on the cake would be to replace instances of the LFC class names with their tagname, e.g., (LzView becomes lz.view).<br></blockquote><blockquote type="cite"><br></blockquote></div></blockquote></div><br><div> <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style=""> <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style=""> <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style=""> <div><br>--</div><div><br>Don Anderson<br>Java/C/C++, Berkeley DB, systems consultant<br><br>voice: 617-547-7881<br>email:&nbsp;<a href="mailto:dda@ddanderson.com" target="_blank">dda@ddanderson.com</a><br>www:&nbsp;<a href="http://www.ddanderson.com/" target="_blank">http://www.ddanderson.com</a><br> </div></div></span></span><br></div></span></div></span><br> </div><br></div></div><br></blockquote></div><br><br clear="all"><br>-- <br>Sebastian Wagner<br><a href="http://www.webbase-design.de">http://www.webbase-design.de</a><br> <a href="http://openmeetings.googlecode.com">http://openmeetings.googlecode.com</a><br><a href="http://www.laszlo-forum.de">http://www.laszlo-forum.de</a><br><a href="mailto:seba.wagner@gmail.com">seba.wagner@gmail.com</a></blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br class="Apple-interchange-newline">--</div><div><br>Don Anderson<br>Java/C/C++, Berkeley DB, systems consultant<br><br>voice: 617-547-7881<br>email:&nbsp;<a href="mailto:dda@ddanderson.com">dda@ddanderson.com</a><br>www:&nbsp;<a href="http://www.ddanderson.com/">http://www.ddanderson.com</a><br></div></div></span></span><br class="Apple-interchange-newline"></div></span></div></span><br class="Apple-interchange-newline"> </div><br></div></body></html>