approved.

Should this now be showing up in the reference, and have nav pane
entries?

On Nov 19, 2008, at 5:30 PM, P T Withington wrote:

Change 20081118-ptw-u by [EMAIL PROTECTED] on 2008-11-18 17:14:04 EST
   in /Users/ptw/OpenLaszlo/trunk
   for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: First pass at <mixin>

New Features: <mixin>

Bugs Fixed:
LPP-2302  Implement LZX <mixin> tag
LPP-7365 Update color names to use CSS3 standard

Technical Reviewer: max (pending)
QA Reviewer: hminsky (pending)
Doc Reviewer: [EMAIL PROTECTED] (pending)

Documentation:

   <mixin> is like <class> but rather than creating something you can
   instantiate, creates a template that can be 'mixed in' (added to)
   more than one other class.  A <mixin> is like an interface, but it
   is allowed to have state and implementation.

   <mixin> is an advanced feature.  To add a mixin to a class you
   say:

   <class name="icecream" ... />
   <class name="walnuts" ... />

   <mixin name="toppings">
     <attribute name="sauce" type="color" value="lavender" />
     <attribute name="whippedcream" type="boolean" value="true" />
     <attribute name="cherry" type="boolean" value="true" />
     ...
   </mixin>

   <class name="sundae" extends="icecream" with="toppings />

   <sundae name="chocfulla"
     flavor="honeydew"
     sauce="lemonchiffon">
     <walnuts ground="true" />
   </sundae>

   See tests/classes.lzx for a more complete example

Details:
   test/classes: Create a more complex example using classes and
   mixins

   lfc-undeclared: Add <mixin>

   LzConstants, ViewSchema: Update color tokes to CSS3 standard

   ClassCompiler: Learn how to create interstitial <nodes>, insert
   them into the schema.

Compiler, MixinCompiler: For now, just compiles the mixin as a class.

   NodeModel: Only classes can have `extends` or `with` attributes.

   ElementWithLocationInfo: Support cloning of elements (to make
   mixin interstitials).

Tests:
   smokecheck, test/classes.lzx

Files:
M      test/classes.lzx
M      WEB-INF/lps/schema/lfc-undeclared.lzx
M      WEB-INF/lps/lfc/core/LzConstants.lzs
M WEB-INF/lps/server/src/org/openlaszlo/compiler/ ClassCompiler.java A WEB-INF/lps/server/src/org/openlaszlo/compiler/ MixinCompiler.java M WEB-INF/lps/server/src/org/openlaszlo/compiler/ ToplevelCompiler.java M WEB-INF/lps/server/src/org/openlaszlo/compiler/ InterfaceCompiler.java
M      WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
M      WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
M      WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java
M      WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/ ElementWithLocationInfo.java


Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20081118-ptw-u.tar

Reply via email to