logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

odd behaviour of Scale widget: msg#00050

Subject: odd behaviour of Scale widget
Hi all,

I'm using a Scale widget in my application. Some of it's features
can be configured during runtime (-from, -to, -resolution, -tickinterval).

I noticed, that the Scale widget is buggy or at least odd behaving
during this reconfigurations sometimes.

For more see the little test script attached:
(See attached file: testScale.pl)
It creates 4 Scales. The topmost can be configured with the
other 3 Scales. You can try a lot of things there yourself, but
if you set e.g. -from to 1 (using the second slider) and then
first increase, then decrease the tick interval (bottommost
slider), you will notice, that it moves the slider, when the
tickinterval is increased and also when it's decreased.
But once the tick interval was at 4 or so and you want to
change it back to 1, it doesn't work.
You can see a lot more oddities when changing the resolution.
Most of the problems I saw are there, when the from value is not 0.

I don't want to describe all the things I tried out here - you can do
yourself - especially playing with resolution and tickinterval.

I just want to ask, who could debug this (as the essential part of
the Scale.pm code is not Perl - so the user on the street can't do
anything about it...).

Nick, possibly you would have to have a look inside the Tk guts?
Tcl/Tk (I tried 8.3.5 on Linux and 8.4.4 on Windows) behaves a bit
better in this respect (see the tcl script included, that does the
same as the perl script)
(See attached file: testScale.tcl)
At least changing the tickinterval doesn't influence the -from value.
But like with Perl changing the resolution does change the -from
value, if it doesn't fit the resolution grid started at 0.

I think the resolution grid should always start at the -from value and
the tickinterval too and it should have no influence on -from nor on
the sliderposition.

Thanks & regards,
Gerhard

Btw.: I'm using ActiveState Perl 5.6.1 build 635, but I also saw more
or less the same behaviour on Perl 5.8.5 on Linux.
---------------------------------------------------------------------------------------

Gerhard Petrowitsch                                Tel.: +49 8151 270 126
Philips Semiconductors                         Fax:  +49 8151 270 200
Petersbrunnerstr. 17                Home Office: +49 821 9069 741
82319 Starnberg, Germany      SERI: gerhard@DESTNSC1
---------------------------------------------------------------------------------------

Be like the ant.  When the ant gets a mixture of sand and sugar,
it selects only sugar; it neglects sand. See only good in others.
Pay no attention to the bad.                                (Sathya Sai
Baba)
--------------------------------------------------------------------------------------------

Attachment: testScale.pl
Description: Binary data

Attachment: testScale.tcl
Description: Binary data

<Prev in Thread] Current Thread [Next in Thread>