tcl bug ? (interesting)

Peter L. Peres plp-ysDPMY98cNQDDBjDh4tngg at public.gmane.org
Sun Mar 14 21:02:13 UTC 2004


I have another strange tcl issue. I promise to subscribe to the tcl
mailing list and ask there the next time. But it may be interesting. It is
a focus issue. Here goes:

I have a canvas .c and a text window object in it, .c.t . I enter the text
window and edit stuff but when I leave it the leave binding fires
(sometimes ?!!) and the focus stays in the text window. More precisely, if
the mouse stops on the text border decoration, then the Leave event fires
ok, if not, then not. I think that I found a bug but I am not sure ?
Again: after editing in the text window and exiting it, the focus stays in
the text window until either the mouse stops on the text decoration or the
mouse exits and reenters the canvas. Some bindings I use were omitted for
clarity below:

--snip--
canvas .c
pack .c
focus .c

text .c.t -width 10 -height 10 -relief ridge
set wo [.c create window 50 50 -window .c.t -anchor nw]

.c bind $wo <Leave> {focus .c; .c focus ""}
--snap--

To test, enter the text window, type a few characters, then exit it with
the mouse. The focus should pass to the canvas. Sometimes it does,
sometimes it does not ...

$tk_version is 8.4 (8.4.1 or such). I did not yet check that this also
happens on Windows.

tia,

Peter


--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list