Current status, haven't applied your changes yet, will do it now.
LzNode#__LZapplyArgs(..):
- when you call the early setters, you defined a "setr" variable, but it
isn't used anywhere
- setters are now called in reversed order, I don't think we guarantee
anything about the setter-order, but it /may/ break any fancy apps
LzNode#__LZstoreRefs():
- missing $debug
LzNode#__LZresolveRefs():
- missing $debug
LzNode#__LZresolveReferences():
- missing $debug
LzNode#applyConstraint(..):
- "constraintMethodName" shouldn't be a global variable
LzNode#applyConstraintMethod(..):
- Maybe you should underline that the constraint-method must already
exist on the node. (Yes, I do know you've wrote "method" which says
implicitly it's already on the node, but I'm not quite sure, whether
everyone knows the exact differences between methods and functions. And
in the javadoc there is again "function".)
- don't you want to improve the delegate construction a bit, like:
var dp;
for (var i = 0; i < l; i += 2) {
dp = dependencies[i];
if (dp) {
var d = new LzDelegate(this, constraintMethodName, dp, "on" +
dependencies[i + 1]);
this.__LZdelegates.push(d);
}
}
LzCanvas#__LZcallInit():
- "TODO: ask Max": canvas overwrites LzView#init(), most likely only a
legacy of pre-4 OL, I think you should be able to remove both things, so
the explicit call for initializing the sprite and the overwrite of
LzView#init()
LzState#remove():
- missing $debug
LzState#__LZapplyArgs(..):
- you iterate over the held-object and while you do that, you also
modify it. Questions: may performance suffer because of this? So, does
the runtime notice these changes, or does it discard them?
(Thinking of Java, where you can't simply change a Map while iterating
over it)
You use a couple of times: "foo.bar instanceof LzInitExpr" and "bar" can
be undefined. Was it the instanceof- or the is-operator in AS3, which
makes problems when using it with undefined values? (for example in
LzReplicationManager#construct(..) you're doing this)
On 2/13/2008 9:43 PM, P T Withington wrote:
Change 20080208-ptw-T by [EMAIL PROTECTED] on 2008-02-08
08:18:39 EST
in /Users/ptw/OpenLaszlo/ringding
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Unify argument initialization
Bugs Fixed:
LPP-1587 'ECMA4: Compile LZX declarations as JS declarations' (partial)
LPP-631 'can't override a constraint with a literal with state
attributes'
Technical Reviewer: [EMAIL PROTECTED] (pending)
QA Reviewer: [EMAIL PROTECTED] (pending)
Details:
Initial values, initial expressions ($once), and constraints
($always), now are created as a unified list in the tag compiler
solving several issues with overriding/inheritance of attribute
values and constraints and enabling the solution to an issue with
states and constraints.
TextStprite: Update test for constraint on width or height.
LzNode, UserClass: Simplify attribute inheritance/override
computation,
maintain backward-compatible magic-merge of attribute values (for
now).
LzNode: Update documentation of `construct` to note that
constraints are now unified in `args`. __LZapplyArgs uses new
args organization to sort out initialization expressions and
constraints. __LZresolveReferences uses the new information to
run initialization expressions and install constraints.
__LZresolveRefs no longer needed. applyConstraint deprecated, but
backward-compatible. New interface: applyConstraintMethod.
Private releaseConstraint did not work, removed. New interface:
releaseConstraintMethod.
LzDefs: Turn LzDeclaredEvent into a singleton class. Add private
support classes LzInitExpr and LzConstraintExpr.
LaszloView: Update test for constraints. Fix setAlign and
setValign to work with constraint methods, and to correctly work
if alignment is changed (to release previous constraint).
LaszloCanvas: Update __LZcallInit to parallel LzNode more
closely.
LzState: Update capturing of held args and constraints. Use this
new organization to release constraints the state will override
(and re-apply them when the state is removed). Remmove unused
__LZstoreRefs.
LzReplicationManager: Fix xpath constraint to work with constraint
methods.
Function.java: Make Function#name public.
NodeModel.java: Coalesce $once, $path, $always into single
arglist, distinguishing 'binders' by internal type, either
LzInitExpr or LzConstraintExpr.
Tests:
smokecheck, amazon, most-components
Files:
M WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as
M WEB-INF/lps/lfc/debugger/LzMessage.lzs
M WEB-INF/lps/lfc/core/LzNode.lzs
M WEB-INF/lps/lfc/core/UserClass.lzs
M WEB-INF/lps/lfc/core/LzDefs.lzs
M WEB-INF/lps/lfc/views/LaszloView.lzs
M WEB-INF/lps/lfc/views/LaszloCanvas.lzs
M WEB-INF/lps/lfc/helpers/LzState.lzs
M WEB-INF/lps/lfc/data/LzReplicationManager.lzs
M WEB-INF/lps/server/src/org/openlaszlo/sc/Function.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
Changeset:
http://svn.openlaszlo.org/openlaszlo/patches/20080208-ptw-T.tar