[Tkinter-discuss] Persuading after_idle callback to only get called when the window is mapped

Michael Lange klappnase at web.de
Tue Jan 12 22:14:52 CET 2010


Hi Geoff,

(...)
> 
> I have got something that seems to work now, which is to create a
> thread, call wait_visibility in it
> and then add the idle handler, and then call update_idletasks at the
> beginning of the idle
> handler. Feels to me like all that fuss shouldn't really be necessary,
> but there we are. If anyone
> knows of a simpler way I'd be interested to hear what it is.

This sounds like you are trying to access tk from within two different
threads which is generally a bad idea, though it may *seem* to work
sometimes.
Maybe we can provide better help if you could post a short code snippet
that demonstrates your problem.

Regards

Michael


More information about the Tkinter-discuss mailing list