[Laszlo-dev] For Review: Change 20081208-bargull-Vta Summary: add type check in releaseConstraint

André Bargull andre.bargull at udo.edu
Tue Dec 9 09:15:45 PST 2008



On 12/9/2008 5:57 PM, P T Withington wrote:
> On 2008-12-09, at 11:37EST, André Bargull wrote:
>>
>> On 12/9/2008 2:46 PM, P T Withington wrote:
>>> Approved.
>>> Is there a deeper problem though?  If a state were trying to override 
>>> a data binding of an attribute?
>>
>> I can't follow you here, at least my example was only built that way 
>> to expose the bug and not a real-life situation.
> 
> 
> Would someone ever try to do something like this, where they initially 
> constrain an attribute to a datapath, and then try to override that with 
> a state.  We support a state overriding other constraints, but it seems 
> from what you discovered, trying to override a path constraint will fail.
> 


This is from "LzState#apply()", as you see there is already a check to 
only process "LzConstraintExpr" and nothing else:

> // release any constraints you are about to override
> var pia = parent._instanceAttrs;
> if (pia) {
>   for (var key in this.heldArgs) {
>     if (pia[key] is LzConstraintExpr) {




More information about the Laszlo-dev mailing list