Version 0 of Text Widget Bug

Updated 2005-06-08 17:56:12

MG, on June 8th 2005

Hey folks,

A friend of mine using a Tcl/Tk program I wrote (Potato MUSH (MUD) Client) seems to have found a bug in the Text widget, but it's one I can't to replicate (I'm using ActiveTcl 8.4.9). The text widget has a few modified bindings, but the only one which could be relevant to this is a new <MouseWheel> binding:

  bind Text <MouseWheel> {mouseWheel %W %X %Y %D}
  proc mouseWheel {w x y d} {

    set in [winfo containing -displayof $w $x $y]
    if { $in == "" || [winfo class $in] != "Text" } {
         $w yview scroll [expr {- ($d / 120) * 4}] units
       } else {
         $in yview scroll [expr {- ($d / 120) * 4}] units
       }
  };# mouseWheel

When he scrolls with the middle button (a wheel mouse), the display of the Text widget becomes, for lack of a better word, "screwy". A couple of screen shots (before and after scrolling) are below, along with some info on his computer / Tcl version.. if anyone has any ideas, about whether this is a bug in the Text widget or something in my code, I'd appreciate any help.

Mike

(My apologies for the huge images, btw - I didn't want to shrink them for risk of losing clarity)


 % set tcl_patchLevel
 8.4.9
 % set tk_patchLevel
 8.4.9
 % parray tcl_platform
 tcl_platform(byteOrder) = littleEndian
 tcl_platform(machine)   = intel
 tcl_platform(os)        = Windows NT
 tcl_platform(osVersion) = 5.1
 tcl_platform(platform)  = windows
 tcl_platform(user)      = The Master
 tcl_platform(wordSize)  = 4

Before:

http://www.talvo.com/textwidget/bugtst1.JPG

And after:

http://www.talvo.com/textwidget/bugtst2.JPG