Change 20100409-ptw-7 by [email protected] on 2010-04-09 13:47:40 EDT
in /Users/ptw/OpenLaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Make constraints and dependencies more debuggable and compatible
New Features: You will now get warnings in debug mode when you write
an $always{} constraint whose dependencies cannot be tracked.
Bugs Fixed: LPP-7344 Attepting to constrain a non-LzEventable object property
gives ActionScript error in SWF9
Technical Reviewer: [email protected] (pending)
QA Reviewer: hminsky, max (pending)
Release Notes:
In debug mode, the evaluation of $always{} constraint dependencies
is more careful. You will get a warning when your constraint
depends upon a value or function whose dependencies cannot be
computed. Most often you will find that you probably meant to use
a $once{} constraint (that the value being computed does not
change over time).
Overview:
Removed the type declaration from LzDelegate so that a more
friendly error can be displayed. Added code in debug mode to
validate property and function dependencies and issue a warning
when they cannot be resolved.
Details:
regression: Use data type declaration rather than coercion in
constraint
LzNode: Take greater care installing dependencies. In debug mode
give warnings that relate the dependency errors to the constraint
the user wrote. Ensure that despite failing dependencies, the
constraint is at least evaluated once (for backward compatibility
with swf8 behavior).
LaszloEvents: Revert to runtime type-checking of LzDelegate
arguments. swf8 allows delegates on non-LzEventable for
compatibility with the swf8 kernel, but all other runtimes will
refuse to create delegates if the context is not an LzEventable or
the method is not a method. Similarly, delegates will only be
registered on LzEventable events in the modern runtimes. Also
repaired LzDelegate#_dbg_name_ to work with the new __events
Array.
LzRuntime: Add support for verifying reference dependencies and
calculating method dependencies carefully
ReferenceCollector: Collect annotations for debug mode to support
more intelligible error messages. Removed obsolete 'subfunction'
API, no longer used. Added `pureFunctions` filter to reduce
irrelevant dependency computations.
*Generator: Remove obsolete #pragma "constraintFunction" support.
Compiler, NodeModel: Rework dependencies computation to support
better debugging.
dragstate, basescrollbar, basecomponent, basewindow: Add some
missing dependency methods. Rework conditional constraints (which
the compiler does not really understand) to be method constraints
with appropriate dependencies.
Tests:
Test case from bug. Smokecheck. Calendar, LzPix, Amazon,
Animation demos
Files:
M test/smoke/regression.lzl
M WEB-INF/lps/lfc/core/LzNode.lzs
M WEB-INF/lps/lfc/events/LaszloEvents.lzs
M WEB-INF/lps/lfc/compiler/LzRuntime.lzs
M WEB-INF/lps/server/src/org/openlaszlo/sc/ReferenceCollector.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
M lps/components/utils/states/dragstate.lzx
M lps/components/base/basescrollbar.lzx
M lps/components/base/basecomponent.lzx
M lps/components/base/basewindow.lzx
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20100409-ptw-7.tar