You've gone overboard in the schema: Only apply, call, and prototype
are class props. The rest should stay as instance props.
Do you have a test for a subclass having a static method with the same
name as a superclass? This should be allowed, but I think the schema
parser will complain. (Class methods don't override, so they can't
collide.)
So, I think the callers of getAttributeTypeOrException should only be
calling it for instance allocation -- there is no inheritance of
static properties, so there is no type defaulting either.
One of us needs to think about this in NodeModel too. Essentially all
the places where we default type or worry about overriding don't apply
for static properties. I guess what we have will work so long as
static property names don't collide between super and subclass, but to
be accurate, we should make it so that the compiler does not try to
treat class properties as inherited.
On 2008-05-06, at 18:50 EDT, Henry Minsky wrote:
Change 20080506-hqm-O by [EMAIL PROTECTED] on 2008-05-06 18:48:10 EDT
in /Users/hqm/openlaszlo/trunk5
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: allocation of static properties for lzx classes
New Features:
Bugs Fixed: LPP-5933
Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Tests:
lztest, amazon
added new test, lztest-static-attrs.lzx , but one check is failing,
see comment in test file
Files:
M test/lztest/smoketest.txt
A test/lztest/lztest-static-attrs.lzx
M test/lztest/rhino.txt
M WEB-INF/lps/schema/lfc.lzx
M WEB-INF/lps/server/src/org/openlaszlo/xml/internal/Schema.java
D WEB-INF/lps/server/src/org/openlaszlo/xml/internal/
XMLCompiler.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/
ClassCompiler.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/
ViewSchema_Test.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/
AttributeSpec.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080506-hqm-O.tar