| 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).
|