Scrollbar (slider) mystery.
Buster
wouter.abraham at scarlet.be
Sat Jun 18 04:35:23 EDT 2005
Hi Alex,
Bug 1912
reassigned but not solved
Greetings,
Wouter
On 18 Jun 2005, at 03:35, Alex Tweedly wrote:
> Here's some simple code:
>
>
>> put the thumbPos of scrollbar "Slider1" into fR
>> put fR into msg
>>
>
> The slider has startvalue 1, endvalue 100, and thumbPos 75 (all
> set in the property inspector).
>
> This prints out "75" just as I expected.
> But fR doesn't *really* have the value 75, as I found out after
> literally hours of debugging :-(
>
> If I change the code to
>
>
>> put the thumbPos of scrollbar "Slider1" into fR
>> put fR && fr+1 into msg
>>
>
> it prints out
> 75 75.856855
> (i.e. fR really has somewhere close to 74.866855 in it, but
> "put"ting it for some reason rounds it 75)
>
> I assumed the value of the thumbPos would be an integer - mostly
> because the prop inspector won't let me set any other values,
> partly because I just expected it to be, and partly because that's
> what it appears to be when you examine the variable by outputting
> it (or by looking at it in the debugger).
>
> I can deal with non-integral values - but I'm really worried that a
> value which was noticeably different from the integer was printed
> out as an integer both in the debugger and by "put ... into msg".
>
> Am I missing something basic here ?
> Why should Rev be doing this ?
>
> P.S. the reason this took hours to find was that both the put
> statements I added for debugging and later the debugger itself were
> giving misleading info - if either of them had said "74.85..." I'd
> have seen the problem in 30 seconds (I think).
>
>
> --
> Alex Tweedly http://www.tweedly.net
More information about the use-livecode
mailing list