I do the following to work around this issue -
<attribute name="_start" value="$path{'@start'}" />
<attribute name="start" value="${Number(_start)}" />
Yeah, it would save a bit of time and clean up my code a little if the platform
took care of this!
-e
On Mon, 11 Sep 2006, P T Withington wrote:
> This is a know problem. There is a proposal on the Wiki for an
> enhancement to address the issue.
>
> http://wiki.openlaszlo.org/Attribute_Type_Coercion
>
> Your comments are welcome!
>
> On 2006-08-09, at 03:30 EDT, Robin Sheat wrote:
>
> > I keep running into the problem where I have something like this:
> > <attribute name="start" type="number" value="$path{'@start'}"/>
> > However, because the data is coming from XML, it doesn't seem to
> > actually be a number when I access it like 'object.start', rather
> > it's a
> > string. Is it possible to coerce that value into being a number
> > when it
> > loads? Something like:
> > <attribute name="start" type="number" value="${Number(path
> > {'@start'})"/>
> >
> > This would save me a lot of time debugging silly little issues every
> > time I forget about it :)
> >
> > Cheers, Robin.
> > _______________________________________________
> > Laszlo-user mailing list
> > [email protected]
> > http://www.openlaszlo.org/mailman/listinfo/laszlo-user
>
>
> _______________________________________________
> Laszlo-user mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
>
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user