Scrollbar rudeness

RCS rcs at rcsprogramming.com
Tue Jan 7 09:07:00 EST 2003


  I was trying to do a simple calculation within a 'scrollBarDrag' when I
realized that the numberFormat seems to be 'fixed'  as '00000.#####' (or so)
within this handler. I can get the thumbPosition as a number without this
resolution (i.e. no numbers to the right of the decimal point) and the
number I am adding is simply 300 (this number varies). So adding 300 + (the
thumbPosition of me) was resulting in numbers like  '303.01112'  no matter
what. Yes, I tried many different numberFormats for the object setting
itself with no effect.

  If I 'put the thumbPosition of me && 300' from within the handler just to
see if the thumbPosition was giving me this resolution, I would get '3 300'
as you would expect (no decimal place). It was the 'addition' of these two
numbers within the handler that was creating the anomoly...

Solution:

I had to 'put round (300 + (the thumbPosition of me)) into myNum' to get it
to work.

Is that the way it is supposed to work? This is strange...if not rude.   ;-)

<MetaCard 2.4.3 and MetaCard 2.5 B1 Windows 98SE>

JR




More information about the metacard mailing list