[Laszlo-dev] overriding a 'always' constraint
Henry Minsky
henry.minsky at gmail.com
Tue Nov 21 13:39:22 PST 2006
I was looking into a remaining bug in the amazon / DHTML demo and I came
across a case where it appears that
a "always" constraint is running in a different order than it does in the
swf runtime. The symptom is that a view
had it's height constrained as shown below
<class name="tabpanel" clip="true" x="1" width="${parent.width-2}"
bgcolor="#FFFFFF" height="${top.height}"
defaultplacement="content">
^^^^^
And then in some other code there was an oninit method which was trying to
set the height manually, calling this method
<method name="open">
this.animate("height",parent.height-(parent.subviews.length-1)*
top.height-1,333,false);
</method>
In swf, the call to animate the height succeeded, but in DHTML, it appears
that the constraint won out and kept the height
at some smaller setting.
I fixed this by changing the constraint to a $once
<class name="tabpanel" clip="true" x="1" width="${parent.width-2}"
bgcolor="#FFFFFF" height="${once{top.height}"
defaultplacement="content">
However I am wondering what the semantics are supposed to be if you try to
animate an attribute which is constrained to something else.
--
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20061121/4251c093/attachment.html
More information about the Laszlo-dev
mailing list