Bug in setting setting the height of rectangles

Richard Gaskin ambassador at fourthworld.com
Mon Jan 12 21:45:51 EST 2004


Jim Hurley wrote:

> I have been getting some strange results setting the heights of
> graphic rectangles--programmatically.
> 
> For example the following run from the msg box:
> 
> put the height of grc 1 & return after results
> set the height of grc 1 to (the height of grc 1) + 0.1
> put the height of grc 1 after results
> put results
> 
> Gives:
> 
> 70
> 70
> 
> As it should. The addition of .1  to the height should have no
> effect. Graphic 1 is a rectangle.
> 
> But
> 
> put the height of grc 1 & return after results
> set the height of grc 1 to (the height of grc 1) - 0.1
> put the height of grc 1 after results
> put results
> 
> Gives:
> 
> 70
> 69
> 
> Whereas it should give
> 
> 70
> 70
> 
> Subtracting .0000001 from the height also gives
> 
> 70
> 69
> 
> (The +.1 and -.1 arise from a variable determined from a calculation.)
> 
> Mac OS 9, RR 2.1.2
> 
> If anyone can confirm this, I will Bugzilla it.

Is it a bug if it's rounding the subtraction to the nearest whole pixel?
Would round(0.00001) give you what you're looking for?

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge: Publish any database on any Web site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com



More information about the use-livecode mailing list