<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks for the reminder, Andre, I've filed these JIRA to track these issues:<div><br></div><div><a href="http://www.openlaszlo.org/jira/browse/LPP-7244">http://www.openlaszlo.org/jira/browse/LPP-7244</a></div><div><a href="http://www.openlaszlo.org/jira/browse/LPP-7243">http://www.openlaszlo.org/jira/browse/LPP-7243</a></div><div><br></div><div>- Don</div><div><br><div><div>On Oct 25, 2008, at 3:48 PM, André Bargull wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>LzDatapointer#setXPath's return type is "Boolean?", but there are no nullable Boolean in AS3, so I think we need to change the return type to "*".<br>Especially because the java-doc described that false and undefined have different meanings:<br><blockquote type="cite"> * @return Boolean|Undefined: <code>true</code> if the path matches a<br></blockquote><blockquote type="cite"> * single node, <code>false</code> if no or multiple nodes are<br></blockquote><blockquote type="cite"> * matched, <code>undefined</code> if the path is invalid.<br></blockquote>This affects LzDatapointer#setXPath(), LzReplicationManager#setXPath() and potentially also LzDatapointer#runXPath() (return-type was here "Boolean", maybe it should be "*", too).<br><br><br>And I guess my comment from a previous mail is still valid (see e.g. LPP-7236!):<br><blockquote type="cite">I think we need to remove the return types in LzSelectionManager#isMultiSelect(), #isRangeSelect() (and other public methods which may get overridden by users defined subclasses), because our plan was to make the move from swf8/dhtml to swf9 as easy as possible and without any code changes. [Remove return types at least until the compiler is smart enough to fill in the right types.] <br></blockquote><br>Approved!<br><br><br><blockquote type="cite">In case you want to re-review.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Change 20081021-dda-p by <a href="mailto:dda@lester.local">dda@lester.local</a> <<a href="mailto:dda@lester.local">mailto:dda@lester.local</a>> on 2008-10-21 10:03:53 EDT<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> in /Users/dda/laszlo/src/svn/openlaszlo/trunk-a<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> for <a href="http://svn.openlaszlo.org/openlaszlo/trunk">http://svn.openlaszlo.org/openlaszlo/trunk</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Summary: Add return type declarations to SWF9<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">New Features:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Bugs Fixed: LPP-7031 (swf9 back-end is dropping return type declarations)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Technical Reviewer: ptw (pending)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">QA Reviewer: andre (pending)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Doc Reviewer: (pending)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Documentation:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Release Notes:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Details:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> In case you want to re-review. I've tried to incorporate your comments.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> Changed a case in test/smoke/regression.lzl which now expects null instead of<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> undefined. There's a half dozen JIRA's that I'll need to file as a result<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> of the reviews up to now.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> WEB-INF/lps/server/src/org/openlaszlo/sc/ParseTreePrinter.java<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9ParseTreePrinter.java<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> Explicit return types like Boolean in 'function foo () : Boolean { }' were<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> not being emitted by the SWF9 backend. The fix was straightforward,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> the fallout was not...<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> WEB-INF/lps/server/src/org/openlaszlo/sc/Method.java<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> WEB-INF/lps/server/src/org/openlaszlo/sc/Function.java<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> Added a "type" attribute to <method> to set the return type.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> This was needed to get a few cases where lzx code overrides LFC functions (now with return typing!)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> to compile. This type must be 'Javascript' (i.e. Boolean, not 'boolean' is used).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> Some cleanup to reduce the number of constructors for Method/Function. I think<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> this makes the code a bit clearer.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> lps/components/base/datalistselector.lzx<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> lps/components/base/listselector.lzx<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> demos/lzpix/app.lzx<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> Added type="Boolean" to a few methods that override to allow them to compile and<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> run in SWF9.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> Fixing return typing exposed a lot of 'new' typing in LFC and some in application code,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> which caused various consistency errors in several categories.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> - in many .lzs files, functions marked as returning a type did not always<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> explicitly call return, or when they did they did not return a value.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> * Boolean functions now return false in any added return paths.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> * Number functions now return NaN in any added return paths.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> * Object functions now return null in any added return paths.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> * methods truly not implemented return undefined.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> The 'String returns null' case exposed a bug in test/smoke/regression.lzl<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> where an 'undefined' was expected, changed to a null expected.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> Cases that seemed most questionable I marked with:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> TODO: [20081020 dda] review this return value change from LPP-7031<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> - in several .lzs files, functions marked as override did not always match return types.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> - in several .lzs files, toString() is marked as :String, but in others it is not.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> For the moment, it was too big of a job to fix all these as part of this (already<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> large) commit, so typing for this function was commented whenever a<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> compile error showed a mismatch.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> - in several .lzs files, functions with new typing returned a value but without proper typing.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> Type casting was added as appropriate.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.as:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> - type of a local variable wasn't narrowly typed enough, leading to<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> errors in return statements.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> WEB-INF/lps/lfc/debugger/LzDebug.lzs:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> - __StringDescription() needed to be defined with exactly the same argument signature<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> I don't know why return typing exposed this as a problem.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> <br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> WEB-INF/lps/lfc/data/LzLazyReplicationManager.lzs:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> - Certain local variables typed as LzView needed typing commented. Initial attempts<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> to fix the typing errors in this file involved casting, e.g.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> var v:LzView = LzView(this.getNewClone( true ));<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> But these changes broke smokecheck for DHTML. It seems that some assumption<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> about typing is being violated and will need to be tracked down later.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> I commented out the typing for the local variables, and left TODOs to clean<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> this up later.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> <br></blockquote><blockquote type="cite"> <br></blockquote><blockquote type="cite"> Note that the compile errors fixed here only show up when building the LFC (or app) for SWF9.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> In debugging these problems it was most helpful to build the debuglfc to get line number information.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Tests:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> tests: (smokecheck) * (swf8+dhtml)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> apps: (weather+lzpix) * (swf8+swf9+dhtml), hello(swf9)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Files:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M test/smoke/regression.lzl<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/kernel/swf9/LFCApplication.as<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.as<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/services/LzAudio.lzs<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/debugger/LzDebug.lzs<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/debugger/platform/swf9/LzFlashRemote.as<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/debugger/platform/swf9/LzDebug.as<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/views/LaszloView.lzs<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/data/LzReplicationManager.lzs<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/data/LzLazyReplicationManager.lzs<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/data/LzDatapointer.lzs<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/data/LzDataText.lzs<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/data/LzDataNode.lzs<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/data/LzDataElement.lzs<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/data/LzResizeReplicationManager.lzs<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/data/LzDatapath.lzs<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/data/LzParam.lzs<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/data/LzDataAttrBind.lzs<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/lfc/compiler/LzBootstrapDebugService.lzs<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/server/src/org/openlaszlo/sc/Method.java<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9ParseTreePrinter.java<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/server/src/org/openlaszlo/sc/Function.java<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/server/src/org/openlaszlo/sc/ParseTreePrinter.java<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M lps/components/base/datalistselector.lzx<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M lps/components/base/listselector.lzx<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">M demos/lzpix/app.lzx<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Changeset: <a href="http://svn.openlaszlo.org/openlaszlo/patches/20081021-dda-p.tar">http://svn.openlaszlo.org/openlaszlo/patches/20081021-dda-p.tar</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">--<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Don Anderson<br></blockquote><blockquote type="cite">Java/C/C++, Berkeley DB, systems consultant<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">voice: 617-547-7881<br></blockquote><blockquote type="cite">email: <a href="mailto:dda@ddanderson.com">dda@ddanderson.com</a> <<a href="mailto:dda@ddanderson.com">mailto:dda@ddanderson.com</a>><br></blockquote><blockquote type="cite">www: <a href="http://www.ddanderson.com">http://www.ddanderson.com</a> <<a href="http://www.ddanderson.com/">http://www.ddanderson.com/</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote></div></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: <a href="mailto:dda@ddanderson.com">dda@ddanderson.com</a><br>www: <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>