[Laszlo-user] Dynamically creating views from XML
Henry Minsky
henry.minsky at gmail.com
Wed Apr 26 15:57:37 EDT 2006
I suspect the value needs coercing into a number. What are the values
you are passing in?
On 4/26/06, J B <moatas at gmail.com> wrote:
>
> I have a scenario where I am trying to draw a series of small squares of
> different colors. I am getting the information as to what color and
> position from an xml file. However, I am having difficulty using the
> information to set the color.
>
> <canvas width="600" height="600" debug="false">
> <include href="/incubator/tooltip/tooltip.lzx" />
> <dataset name="dset" src="data.xml " />
>
> <class name="pixel" extends="view" width="5" height="5">
> <method event="onmouseover"></method>
> <method event="onmouseout"></method>
> </class>
>
> <class name="row" extends="view" width="100" height="5">
> <view datapath="dset:/nodes/node">
> <pixel bgcolor="${@color}" x="${@x}" y="${@y}">
> <tooltip text="${@tooltip}" />
> </pixel>
> </view>
> </class>
>
> <window width="100" height="100" resizable="true">
> <row />
> </window>
> </canvas>
>
> In he above code, I want to set the color attribute of the pixel class to
> the color attribute found in the dataset, but I cannot seem to access it in
> this manner. Can anyone shed some light on how I might do this?
>
> Thanks!
>
> Birch
>
> _______________________________________________
> Laszlo-user mailing list
> Laszlo-user at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
>
>
>
--
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20060426/699ffb5b/attachment.html
More information about the Laszlo-user
mailing list