Bryan
01-16-2006, 03:58 PM
I've been banging my head against this problem for a couple of hours now, and I've finally confirmed some funkiness going on.
<canvas width="200" height="200">
<dataset name="styles">
<demo>
<style name="one" color="00FF00" bgcolor="0000FF"/>
<style name="two" color="#00FF00" bgcolor="#0000FF"/>
<style name="three" color="0x00FF00" bgcolor="0x0000FF"/>
</demo>
</dataset>
<view datapath="styles:/demo">
<simplelayout axis="y" spacing="5"/>
<text datapath="style" text="$path{'@name'}" width="100%" height="24" fgcolor="$path{'@color'}" bgcolor="$path{'@bgcolor'}"/>
</view>
</canvas>
Now, the text should be green and the background blue - and technically you should set colour values in Laszlo via '0x0000FF' (blue) instead of '#FFFFFF' as per the manual.
"A color in rgb format; for example, 0xff0000 is red."
http://www.openlaszlo.org/lps-latest/docs/reference/view.html#meth-setColor
You'd expect that both fgcolor and bgcolor attributes would take the same values '0x0000ff' - but if you run the above example it seems that fgcolor actually uses '0000FF'. I'm assuming this is actually a bug and not an undocumented feature - or am I missing something blatantly obvious here?
<canvas width="200" height="200">
<dataset name="styles">
<demo>
<style name="one" color="00FF00" bgcolor="0000FF"/>
<style name="two" color="#00FF00" bgcolor="#0000FF"/>
<style name="three" color="0x00FF00" bgcolor="0x0000FF"/>
</demo>
</dataset>
<view datapath="styles:/demo">
<simplelayout axis="y" spacing="5"/>
<text datapath="style" text="$path{'@name'}" width="100%" height="24" fgcolor="$path{'@color'}" bgcolor="$path{'@bgcolor'}"/>
</view>
</canvas>
Now, the text should be green and the background blue - and technically you should set colour values in Laszlo via '0x0000FF' (blue) instead of '#FFFFFF' as per the manual.
"A color in rgb format; for example, 0xff0000 is red."
http://www.openlaszlo.org/lps-latest/docs/reference/view.html#meth-setColor
You'd expect that both fgcolor and bgcolor attributes would take the same values '0x0000ff' - but if you run the above example it seems that fgcolor actually uses '0000FF'. I'm assuming this is actually a bug and not an undocumented feature - or am I missing something blatantly obvious here?