approved

On 7/12/06, P T Withington <[EMAIL PROTECTED]> wrote:
Change change.h0InjS4E5.txt by [EMAIL PROTECTED] /Users/ptw/
pending-changes/ on 2006-07-12 18:40:03 EDT

Summary: First step to eliminating class shim

Bugs Fixed:
LPP-2301 Make it possible to remove compatibility layer

Technical Reviewer: hminsky (pending)
QA Reviewer: mamye (pending)
Doc Reviewer: pbr (pending)

Documentation:
     The old Class mechanism took args (classname, superclass,
     instanceInitializer, classInitializer).  Any other instance
     properties (attributes or methods) were defined by setting them on
     the class prototype, and class properties similarly on the class.

     In the NewClass mechanism, the 3rd and 4th arguments are a hash of
     instance and class properties respectively.

     In _javascript_ 2 there is a class declaration syntax:

     class <name> [extends <super>] {
       [[var <name> [= value]] |
       function <name> (..) { ... }]]*
     }

     We want to convert all the class definitions in .lzs files in the
     LFC to the _javascript_ 2 syntax.

     [I have not yet implemented scope declarations in our parser, so
     we do not yet support class properties in the new syntax.  For
     class properties, you will have to write the call to NewClass.make
     in longhand.]

Details:
     Class: Change 4th arg to NewClass and Trait to be a hash of class
     properties, rather than just the class.initialize method.

     LzClass: use new Class API

     LzDictionary: example of _javascript_ 2 class syntax

     _javascript_Generator, CodeGenerator: translate _javascript_ 2 class
     syntax into a call to NewClass.make.

Tests: smoke/simple, LXPIX

Files:
M      lps/lfc/core/LzClass.lzs
M      lps/lfc/core/LzDictionary.lzs
M      lps/lfc/core/Class.lzs
M      lps/server/src/org/openlaszlo/sc/_javascript_Generator.java
M      lps/server/src/org/openlaszlo/sc/CodeGenerator.java





_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev






--
Henry Minsky
Software Architect
[EMAIL PROTECTED]

_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to