[Laszlo-dev] For Review: Change 20070802-Philip-6. Summary: Fix LzDataElement.makeNodeList()
P T Withington
ptw at openlaszlo.org
Thu Aug 2 10:25:25 PDT 2007
Same questions as for Henry:
Perhaps this static function belongs in the class and not on the mixin?
If it belongs on the mixin, should all the other classes that use it
also get the static alias?
Otherwise approved.
On 2007-08-02, at 11:10 EDT, Philip Romanik wrote:
> Change 20070802-Philip-6 by Philip at Philip-DC on 2007-08-02 10:58:11
> EST
> in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/branches/wafflecone
> for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone
>
> Summary: Fix LzDataElement.makeNodeList()
>
> New Features:
>
> Bugs Fixed: LPP-4418
>
> Technical Reviewer: ptw
> QA Reviewer: (pending)
> Doc Reviewer: (pending)
>
> Documentation:
>
> Release Notes:
>
> Details:
> In 3.4 you can call the static method LzDataElement.makeNodeList()
> to create an array of LzDataElement objects. This is broken in
> Wafflecone (and Legals). In Wafflecone, the method isn't defined as
> static and it exists in LzDataElementTrait. I fixed the static in
> the trait and created a static in LzDataElement. The definition of
> makeNodeList() also broke (it produced at most 1 object) when the
> file was updated to the new class system.
>
> Tests:
>
> This app now runs in wafflecone and produces the same results as 3.4:
>
> <canvas debug="true">
> <method event="oninit"><![CDATA[
> var nodes = LzDataElement.makeNodeList(5, 'mynode');
> for (var i=0; i<nodes.length; i++) {
> Debug.write(i, nodes[i]);
> }
> ]]>
> </method>
> </canvas>
>
> If you run this on an unpatched version of wafflecone:
>
> ERROR: makeNodeList.lzx:3: call to undefined method 'makeNodeList'
> ERROR: makeNodeList.lzx:4: undefined object does not have a
> property 'length'
> WARNING: makeNodeList.lzx:4: reference to undefined property
> 'length'
>
> If you run this on a patched version of wafflecone (or 3.4):
>
> 0 «LzDataElement#0| <mynode/>»
> 1 «LzDataElement#1| <mynode/>»
> 2 «LzDataElement#2| <mynode/>»
> 3 «LzDataElement#3| <mynode/>»
> 4 «LzDataElement#4| <mynode/>»
>
>
> Files:
> M WEB-INF/lps/lfc/data/LzDataElement.lzs
>
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070802-
> Philip-6.tar
>
>
More information about the Laszlo-dev
mailing list