focus question

James Hurley jhurley0305 at sbcglobal.net
Mon Dec 6 13:38:49 EST 2010


>
>
> ------------------------------
>
> Message: 6
> Date: Mon, 6 Dec 2010 10:33:02 -0500
> From: "Walt Brown" <walter.h.brown at gmail.com>
> To: "'How to use LiveCode'" <use-livecode at lists.runrev.com>,
> 	<use-revolution at lists.runrev.com>
> Subject: RE: focus question
> Message-ID: <4cfd0240.8e7adc0a.73ad.5e6e at mx.google.com>
> Content-Type: text/plain;	charset="US-ASCII"
>
> Interesting if useless discovery - LC accepts real numbers as Point  
> values,
> ie "22.5,31.7", not just integers. I haven't discovered if it rounds  
> or
> truncates them in use though.
>
> Walt
>


Walt,

A caution.

LC accepts real numbers as the Loc of objects but integers only as the  
points of line graphics.

If you say:

    set the points of grc 1 to 100,100 & cr & 200,200.5

the graphic disappears. Worse yet, you get no error message. This  
becomes a problem when your points are calculated and the calculation  
yields a fraction somewhere without you realizing it.

However if you say:

    set the loc of grc 1 to 150,150.7

there is no problem. The 150.7 is truncated to 150.

I have asked RunRev (many years ago) to change this anomalous behavior  
but without success.

Jim




More information about the Use-livecode mailing list