Tk Source Code

View Ticket
Login
Ticket UUID: 843172
Title: win scrollbar odd behaviour.
Type: Bug Version: obsolete: 8.5a0
Submitter: vincentdarley Created on: 2003-11-16 14:52:56
Subsystem: 68. Win Window Operations Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2006-03-31 14:55:09
Resolution: Wont Fix Closed By: hobbs
    Closed on: 2006-03-31 07:55:09
Description:
Not 100% sure this is a bug, but definitely odd:

interp create foo

interp alias foo bar {} bar
proc bar {args} { interp delete foo ; error blah }

foo eval {package require Tk}
foo eval {scrollbar .s ; pack .s -side left}
foo eval {.s configure -command bar }

Now try to manipulate the scrollbar... I get not one
error (which of course I would expect), but lots and
lots of them.  In fact the 'interp delete foo' doesn't
manage to delete the interpreter until after the mouse
has been released.

blah
    while executing
"error blah "
    (procedure "bar" line 1)
    invoked from within
"bar moveto 0"
    (scrollbar command)

attempt to call eval in deleted interpreter
    while executing
"bar moveto 0.0909"
    (scrollbar command)

attempt to call eval in deleted interpreter
    while executing
"bar moveto 0.1818"
    (scrollbar command)

attempt to call eval in deleted interpreter
    while executing
...etc

Note: if the above is carried out in the main
interpreter, with '.s configure -command {destroy . ;
error foo}', it's mostly ok, except that the scrollbar
gets drawn, briefly, in the top-left corner of the
screen (I suppose because '.' disappears, but the
scrollbar remains and doesn't know where to draw
itself, and doesn't know it should be dead).
User Comments: hobbs added on 2006-03-31 14:55:09:
Logged In: YES 
user_id=72656

This is expected and a side-effect of having to live in MS'
event queue while you hold down on the scrollbar.