On 12/20/10 1:38 PM, André Bargull wrote:
Some questions for this change set:
- Why <accept> and <present> instead of <method name="accept"> and
<method name="present">?
- Why is it necessary to pass `node` and `attribute` to accept/present?

This is to support css attributes with inherit.

On 12/20/2010 11:05 AM, P T Withington wrote:
Change ptw-20101220-82u by [email protected] on 2010-12-20 04:54:41 EST
in /Users/ptw/OpenLaszlo/trunk-3
for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Next step in user<type>s

Bugs Fixed: LPP-9589 Unexpected warning information of ''gradient"

Technical Reviewer: [email protected] (pending)
QA Reviewer: [email protected], [email protected] (pending)

Overview:
I've hacked in user-defined types. You can now write the gradient
type as:

<type name="gradient">
<accept args="value, node:LzNode, attribute:String">
return new lz.CSSGradient(value);
</accept>

<present args="value, node:LzNode, attribute:String">
return value.css;
</present>
</type>

I know this is not as general as we wanted, but it's the most I
can get working on short notice.

Details:
Basically the types get compiled as very custom classes at resolve time.

Tests:
Rewrite gradienttype.lzx as above and run house.lzx

Files:
M WEB-INF/lps/server/src/org/openlaszlo/sc/ScriptClass.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/TypeCompiler.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java

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


Reply via email to