[Laszlo-dev] For Review: Change 20080513-ptw-I Summary: Make `is` work correctly on mixins
André Bargull
a.bargull at intensis.de
Wed May 14 13:59:00 PDT 2008
Approved.
I did some random tests and I got this runtime error in DHTML when I
wanted to extend a mixin:
> ERROR
> @http://localhost:8080/trunk/lps/includes/lfc/LFCdhtml-debug.js#625:
> $2_superTrait.make is not a function
testcase:
> <canvas debug="true" >
>
> <script when="immediate" >
> mixin MixinA {}
> mixin MixinB {}
> mixin MixinC extends MixinA {}
> mixin MixinD {}
> mixin MixinE {}
>
> class ClassA {}
> class ClassB {}
> class ClassC extends ClassA {}
>
> class TestAA extends ClassA with MixinA {}
> class TestAAB extends ClassA with MixinA, MixinB {}
> class TestAAB2 extends TestAA with MixinB {}
> class TestC extends ClassC with MixinA {}
> class TestC2 extends TestC with MixinC {}
>
> class TestX extends ClassA with MixinB, MixinD {}
> class TestXX extends ClassA with MixinB, MixinD {}
> class TestXXX extends ClassA with MixinB, MixinD, MixinE {}
> class TestX4 extends ClassA with MixinA, MixinB, MixinD, MixinE {}
> class TestX5 extends TestX4 {}
> </script>
>
> <handler name="oninit" >
> Debug.write(new TestAA() is ClassA, new TestAA() is MixinA);
> Debug.write(new TestAAB() is ClassA, new TestAAB() is MixinA, new
> TestAAB is MixinB );
> Debug.write(new TestAAB2() is ClassA, new TestAAB2() is MixinA,
> new TestAAB2 is MixinB );
> Debug.write(new TestC() is ClassA, new TestC() is MixinA);
> Debug.write(new TestC2() is ClassA, new TestC2() is ClassC, new
> TestC2() is MixinA, new TestC2() is MixinC);
>
> Debug.write(new TestX() is ClassA, new TestX() is MixinB, new
> TestX() is MixinD);
> Debug.write(new TestXX() is ClassA, new TestXX() is MixinB, new
> TestXX() is MixinD);
> Debug.write(new TestXXX() is ClassA, new TestXXX() is MixinB, new
> TestXXX() is MixinD, new TestXXX() is MixinE);
> Debug.write(new TestX4() is ClassA, new TestX4() is MixinA, new
> TestX4() is MixinB, new TestX4() is MixinD, new TestX4() is MixinE);
> Debug.write(new TestX5() is ClassA, new TestX5() is TestX4, new
> TestX5() is MixinA, new TestX5() is MixinB, new TestX5() is MixinD,
> new TestX5() is MixinE);
> </handler>
>
> </canvas>
On 5/14/2008 12:06 AM, P T Withington wrote:
> Change 20080513-ptw-I by ptw at dueling-banjos.home on 2008-05-13
> 17:39:45 EDT
> in /Users/ptw/OpenLaszlo/ringding-2
> for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Make `is` work correctly on mixins
>
> Bugs Fixed:
> LPP-5402 'trait/mixin forgets its implementations'
>
> Technical Reviewer: a.bargull at intensis.de (pending)
> QA Reviewer: hminsky (pending)
>
> Details:
> *: Got rid of the (useless) toString and
> _dbg_name methods in LzEventable. Which meant re-organizing the
> overrides and defining toString in LzDataNode.
>
> Class: Make naming of interstitial classes not collide by adding
> the name of the class they are the prototype for when storing in
> the implementations table.
>
> Tests:
> smokecheck, ant runlzunit, updated test case from bug:
>
> <canvas debug="true" >
> <dataset name="dset" >
> <node>Text</node>
> </dataset>
> <handler name="oninit" >
> Debug.write("%w is %w: %s", dset, LzDataNode, dset is
> LzDataNode);
> Debug.write("%w is %w: %s", dset.getFirstChild(), LzDataNode,
> dset.getFirstChild() is LzDataNode);
> Debug.write("%w is %w: %s",
> dset.getFirstChild().getFirstChild(), LzDataNode,
> dset.getFirstChild().getFirstChild() is LzDataNode);
> Debug.write("%w is %w: %s", dset, LzDataElementMixin, dset is
> LzDataElementMixin);
> Debug.write("%w is %w: %s", dset.getFirstChild(),
> LzDataElementMixin, dset.getFirstChild() is LzDataElementMixin);
> </handler>
> </canvas>
>
> Files:
> M WEB-INF/lps/lfc/core/LzNode.lzs
> M WEB-INF/lps/lfc/core/LzEventable.lzs
> M WEB-INF/lps/lfc/data/LzDataNode.lzs
> M WEB-INF/lps/lfc/data/LzDataElement.lzs
> M WEB-INF/lps/lfc/compiler/Class.lzs
>
>
> Changeset:
> http://svn.openlaszlo.org/openlaszlo/patches/20080513-ptw-I.tar
>
More information about the Laszlo-dev
mailing list