In the case of styles I think this means that __LZApplyStyleMap  
should _not_ set an attribute that already has a value (because that  
means the value has already been set by __LZApplyArgs.

Gosh it would be nice if we could have a more uniform mechanism for  
initializing attributes...

On 2006-10-06, at 21:04 EDT, Adam Wolff wrote:

> No, you should be able to override a $style value in a subclass.  
> There's
> special code in the LFC that makes it possible to override $always and
> $once constraints.
>
> A
>
> On Oct 6, Benjamin Shine wrote:
>
>>
>> Gregor, I think you have found a bug, here. I've filed it as
>> LPP-2894. Adam and Tucker, do you agree that this behavior is  
>> incorrect?
>>
>> the bug:
>>
>> Subclasses and instances cannot override style constraints set on the
>> superclass. If a class has a attr="$style{'thingy'}", then all
>> subclasses and instances of that class will have that style
>> constraint -- even if a subclass explicitly sets the value of that
>> attribute to a constant. The expected behavior is: if a class
>> explicitly sets the value of an attribute to a constant, instances of
>> that class have the attribute value specified by that constant,
>> regardless of what the class's superclasses do.
>>
>> I see the correct behavior on non-style-constraint attributes, such
>> as width, below, but the wrong behavior on the bgcolor attribute  
>> below:
>>
>>    <class name="styledbox" width="70" height="70" bgcolor="$style
>> {'stylebgcolor'}" >
>>          <view name="inner" bgcolor="$style{'styleinnercolor'}" x="5"
>> y="5" width="10" height="10" />
>>      </class>
>>
>>      <class name="subclassbox" extends="styledbox">
>>          <attribute name="bgcolor" value="0x000088" />
>>          <attribute name="width" value="150" />
>>      </class>
>>
>>      <subclassbox id="sb2" />
>>
>> EXPECTED: sb2 should be green and have width 150
>> ACTUALLY sb2 is purple and has width 150.
>>
>>
>> I've added a test case as trunk/test/style/constraints/ 
>> subclassing.lzx.     
>>
>> -ben
>>
>>
>> _______________________________________________
>> Laszlo-dev mailing list
>> [email protected]
>> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
>>
>
> _______________________________________________
> Laszlo-dev mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev


_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to