From: SourceForge.net <no...@so...> - 2003-08-22 14:44:03
|
Bugs item #779559, was opened at 2003-07-29 08:47 Message generated for change (Comment added) made by dgp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=779559&group_id=12997 Category: 15. [scale] Group: 8.4.4 >Status: Pending >Resolution: Works For Me Priority: 5 Submitted By: Al Larson (speedboat) Assigned to: Don Porter (dgp) Summary: scale widget triggering on enter/leave events (LINUX only) Initial Comment: The following occurs on LINUX only. I tried many Linux systems with differing O/S versions. All failed. May be a compiler bug, but I'll report and see if anyone else has seen this problem. With the -resolution parameter set to a decimal value (.1 for example) , the widget triggers and executes the -command when the cursor enters and leaves the the slider area (and with tk_strictMotif set, the entire widget). The problem appears to be that TkRoundToResolution() returns a value with digits way beyond the end of the specified resolution. Then when -configure events occur, this value is then rounded again producing a slightly different value, so the command is triggered, even though the event was a simple background change as the result of an Enter/Leave event. My solution (HACK), was to use the "new" value calculated within TkRoundToResolution() within a dummy print statement. I have no idea why this removes the extra junk, but it does, and the results are that the scale widget works as it should. I've attached a two line example which demonstrates the problem. When the example starts, things work as expected, but once the slider has been moved. Moving the cursor thru the slider area triggers the command. ---------------------------------------------------------------------- >Comment By: Don Porter (dgp) Date: 2003-08-22 10:44 Message: Logged In: YES user_id=80530 Well, I'd filled out a long comment about being unable to reproduce this, and blaming buggy compilers, and then I reproduced it. Reproduction using gcc 2.95.3 to compile. All default configuration options for Tcl/Tk. Run the demo script. Move the slider. Then move the cursor back and forth over the "thumb" control of the slider. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2003-07-29 13:36 Message: Logged In: YES user_id=80530 Sounds even more like Bug 220265 where a compiler bug was diagnosed. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2003-07-29 13:34 Message: Logged In: YES user_id=80530 Sounds a bit like Bug 220665 but that was fixed long ago. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=779559&group_id=12997 |