[Laszlo-dev] For Review: Change 20080208-ptw-T Summary: Unify argument initialization

André Bargull a.bargull at intensis.de
Thu Feb 14 13:55:19 PST 2008


everything works now for me, so _Approved!_


On 2/14/2008 10:49 PM, André Bargull wrote:
> dhtml works now, after adding:
>> var setrs = this.setters || {};
>
> On 2/14/2008 10:45 PM, André Bargull wrote:
>> adding "this." in applyConstraint() helped
>>> return this.applyConstraintMethod(constraintMethodName, dependencies);
>> next error in __LZapplyArgs, "setrs" can be null/undefined, but 
>> there's a "in setrs"-test which fails!
>>
>>
>> On 2/14/2008 10:39 PM, P T Withington wrote:
>>> Hm.  I thought I had tested test/lz/components/most-components.lzx, 
>>> but that is definitely busted.  Digging...
>>>
>>> On 2008-02-14, at 16:29 EST, André Bargull wrote:
>>>
>>>> Actually, I didn't even know that you can use other things than 
>>>> strings for $path. Just discovered it when I was comparing the 
>>>> diffs! :-)
>>>>
>>>> BTW, may you try to start the components sampler with your change:
>>>> - in flash, the window-component is broken
>>>> - in dhtml (ff2), the splash spins forever and ever and nothing 
>>>> happens, I get this error:
>>>> ERROR 
>>>> @http://localhost:8080/trunk/lps/includes/lfc/LFCdhtml-debug.js#3866: 
>>>> applyConstraintMethod is not defined 
>>>> <javascript:window.parent.$modules.lz.Debug.displayObj(12)>
>>>>
>>>>
>>>> On 2/14/2008 9:58 PM, P T Withington wrote:
>>>>> Thanks for the test case.  This was a brain-oh in NodeModel not 
>>>>> inserting the withThis pragma for $path bindings.  evalPathExpr is 
>>>>> no longer necessary since the path expression is now in a compiled 
>>>>> function that will just be invoked (the same way a $once 
>>>>> initialization is), it just uses a different 'binder' to set the 
>>>>> binding (`dataBindAttribute` instead of `setAttribute`).
>>>>>
>>>>> I fixed this and updated the change if you want to refetch it and 
>>>>> test.
>>>>>
>>>>> I guess I should delete evalPathExpr.
>>>>>
>>>>> On 2008-02-14, at 14:30 EST, André Bargull wrote:
>>>>>
>>>>>> $path{..} is broken for implicit this, also see 
>>>>>> "LzNode#__LZevalPathExpr(..)" (was used before, but you don't 
>>>>>> call it anymore).
>>>>>>
>>>>>> testapp:
>>>>>> <canvas debug="true" >
>>>>>>    <dataset name="ds" >
>>>>>>    <root>
>>>>>>      <node value="1" />
>>>>>>      <node value="2" />
>>>>>>      <node value="3" />
>>>>>>    </root>
>>>>>>  </dataset>
>>>>>>    <simplelayout axis="x" spacing="15" />
>>>>>>    <view layout="axis:y;spacing:5" >
>>>>>>    <text datapath="ds:/root/node" text="$path{'@value'}" />
>>>>>>  </view>
>>>>>>    <view layout="axis:y;spacing:5" >
>>>>>>    <text datapath="ds:/root/node" text="$path{this.path}" >
>>>>>>      <attribute name="path" value="@value" type="string" />
>>>>>>    </text>
>>>>>>  </view>
>>>>>>    <!-- doesn't work anymore -->
>>>>>>  <view layout="axis:y;spacing:5" >
>>>>>>    <text datapath="ds:/root/node" text="$path{path}" >
>>>>>>      <attribute name="path" value="@value" type="string" />
>>>>>>    </text>
>>>>>>  </view>
>>>>>> </canvas>
>>>>>>
>>>>>>
>>>>>> On 2/13/2008 9:43 PM, P T Withington wrote:
>>>>>>> Change 20080208-ptw-T by ptw at dueling-banjos.local 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: a.bargull at intensis.de (pending)
>>>>>>> QA Reviewer: henry.minsky at gmail.com (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
>>>>>>>
>>>>>
>>>>>
>>>
>>>
>>
>


More information about the Laszlo-dev mailing list