[Laszlo-dev] For Review: Change 20080423-dda-7 Summary: SWF9: Provide simple workaround for mixins that use unknown super classes

Donald Anderson dda at ddanderson.com
Wed Apr 23 14:20:02 PDT 2008


Change 20080423-dda-7 by dda at lester.local on 2008-04-23 17:11:40 EDT
     in /Users/dda/laszlo/src/svn/openlaszlo/trunk
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: SWF9: Provide simple workaround for mixins that use unknown  
super classes

New Features:

Bugs Fixed: LPP-5841

Technical Reviewer: ptw (pending)
QA Reviewer: max (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
     When a mixin uses a superclass not known in the current  
compilation, instead
     of rejecting this, we allow a simple workaround: the mixin must  
be coded with
     a constructor, and the programmer takes responsibility for the  
constructor
     working with whatever superclasses the mixin can be used with.

     Conversely, if there is no mixin constructor, then either the  
superclass must be known in the current
     compilation, or there may be no superclass.

     A more sophisticated solution (having real knowledge of all  
potential superclasses) awaits
     for another time.

Tests:
     Ran regression tests: smokecheck,weather,lzpix  X  swf8,dhtml
     Tried some simple tests for functionality:

       ====
       mixin DrawviewShared {
         var floobar;
           function DrawviewShared () {
             super();
             floobar = 42;
           }
       }

       class mydrawview extends LzView with DrawviewShared {
       }

       //Uncommenting this should give an error - we must supply
       // a constructor for badbad if we use it with an 'unknown'
       // superclass like LzView.

       //class mybad extends LzView with badbad {
       //}

       mixin badbad {
         // no constructor
       }
       ====

Files:
M      WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9Generator.java

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080423-dda-7.tar



--

Don Anderson
Java/C/C++, Berkeley DB, systems consultant

voice: 617-547-7881
email: dda at ddanderson.com
www: http://www.ddanderson.com






More information about the Laszlo-dev mailing list