You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by James Hillyerd <ja...@hillyerd.com> on 2009/01/18 09:59:23 UTC

t:if test considers Float < 1.0 as false?

It seems that t:if considers 0.1, 0.999999 as false, but 1.0 as true.
 Should I file a bug?  This is 5.0.18
-james

-- 
James A. Hillyerd <ja...@hillyerd.com>

Re: t:if test considers Float < 1.0 as false?

Posted by Howard Lewis Ship <hl...@gmail.com>.
Seems reasonable to me; the TypeCoercer is coercing Float to Integer
and checking for zero, and that's a lossy coercion that rounds down.

On Sun, Jan 18, 2009 at 12:59 AM, James Hillyerd <ja...@hillyerd.com> wrote:
> It seems that t:if considers 0.1, 0.999999 as false, but 1.0 as true.
>  Should I file a bug?  This is 5.0.18
> -james
>
> --
> James A. Hillyerd <ja...@hillyerd.com>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: t:if test considers Float < 1.0 as false?

Posted by nillehammer <ta...@winfonet.eu>.
Hi James,
I don't think it is an issue with the if-component. If-component just
calls a method that is given in the test-attribute and evaluates whether
it returns true or false. Could it be that in this method you
accidencially do an Integer comparison instead of a Float comparison?
Greetz nillehammer

James Hillyerd schrieb:
> It seems that t:if considers 0.1, 0.999999 as false, but 1.0 as true.
>  Should I file a bug?  This is 5.0.18
> -james
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org