Scrollbar (slider) mystery.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Scrollbar (slider) mystery.

Alex Tweedly
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



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.7.6/19 - Release Date: 16/06/2005

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Scrollbar (slider) mystery.

Ken Ray

> 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

Alex, I just did your example, and I got:

   75  76

That was just dragging out a slider, setting the values as you identified,
and typing in the message box. I tested in 2.5.1 - what version of Rev are
you using? And if you're using 2.6, can you try in 2.5.1 and see if you get
a different result?

Ken Ray
Sons of Thunder Software
Email: [hidden email]
Web Site: http://www.sonsothunder.com/



_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Scrollbar (slider) mystery.

Stephen Barncard
In reply to this post by Alex Tweedly
may I suggest

set the numberformat to "0"
put the thumbPos of scrollbar "Slider1" into fR
put fR && fr+1 into msg


I think we're seeing some kind of dithering when it comes to slider
values if the numberformat is not set to represent an integer. The
slider has a finite number of gradations possible at 72 dpi for mac
and ?? for windows.. and they don't always line up right, hence the
odd fraction. This is normal.  Just make sure you set the
numberformat.

this works for me OSX3.9, Rev 2.6 build 91




At 10:13 PM -0700 6/17/05, Ken Ray 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
>
>Alex, I just did your example, and I got:
>
>    75  76
>
>That was just dragging out a slider, setting the values as you identified,
>and typing in the message box. I tested in 2.5.1 - what version of Rev are
>you using? And if you're using 2.6, can you try in 2.5.1 and see if you get
>a different result?
>
>Ken Ray
>Sons of Thunder Software
>Email: [hidden email]
>Web Site: http://www.sonsothunder.com/
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Scrollbar (slider) mystery.

Wouter-12
In reply to this post by Alex Tweedly
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

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Scrollbar (slider) mystery.

Thomas McGrath III
In reply to this post by Ken Ray
I get 75 76 as well and played with the settings by putting 1.0 into
numberformat and playing with page increment as well and still get
whole numbers. I also tried entering the 75 as 75.0 instead of using
the increment arrows on that field in the property inspector. I can't
seem to duplicate what is being seen.

Tom


On Jun 18, 2005, at 1:13 AM, Ken Ray wrote:

>>
>>>   put the thumbPos of scrollbar "Slider1" into fR
>>>   put fR && fr+1 into msg
>>
>> it prints out
>> 75  75.856855

Thomas J. McGrath III
SCS
1000 Killarney Dr.
Pittsburgh, PA 15234
412-885-8541

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Scrollbar (slider) mystery.

Alex Tweedly
In reply to this post by Wouter-12
Thank you all - in case I haven't said it recently, this list is wonderful !

Ken Ray wrote:

>Alex, I just did your example, and I got:
>
>   75  76
>
>That was just dragging out a slider, setting the values as you identified,
>and typing in the message box. I tested in 2.5.1 - what version of Rev are
>you using? And if you're using 2.6, can you try in 2.5.1 and see if you get
>a different result?

I'm on WinXP, still 2.5.1
It was a newly created scrollbar - but I had changed the size so that may have altered the rounding. Tried a brand new one just now without altering size, and get a value of 75.23...


Stephen Barncard wrote:

> may I suggest
>
> set the numberformat to "0"
> put the thumbPos of scrollbar "Slider1" into fR
> put fR && fr+1 into msg
>
>
> I think we're seeing some kind of dithering when it comes to slider
> values if the numberformat is not set to represent an integer. The
> slider has a finite number of gradations possible at 72 dpi for mac
> and ?? for windows.. and they don't always line up right, hence the
> odd fraction. This is normal.  Just make sure you set the numberformat.

That works well - thanks.
Given that success, I also tried setting the numberformat of the
scrollbar itself, to "0", but that didn't work.

Buster wrote:

> Hi Alex,
>
> Bug 1912
>
> reassigned but not solved
>
> Greetings,
> Wouter
>
Thanks - I'll add the info about numberformat of the scrollbar being
ineffective ...


--
Alex Tweedly       http://www.tweedly.net




--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.7.6/19 - Release Date: 16/06/2005

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution