camfarnell at cogeco.ca
Tue Nov 28 20:21:35 CET 2006
The "global" was omitted when I cut the code down to a skeleton example;
it's in my big program.
I have avoided "update" for the same reason. Even the New Mexico Tech
never to use "update" inside a callback. Thus I have always used
"update_idletasks" when I wanted to make sure something got displayed *now*.
That said, inserting "update" does fix the problem without creating any
Bob Greschke wrote:
> ----- Original Message -----
> From: Sorin Schwimmer
> To: tkinter-discuss at python.org
> Sent: Tuesday, November 28, 2006 11:42 AM
> Subject: Re: [Tkinter-discuss] Stumped
> I never tried Bob's Greschke idea of using update() in a callback, because
> of this reason:
> I've thought about that from time-to-time too, but I've never seemed to run
> into any problems. I wonder if it is something like on_button() will only
> be called if the Go button is pushed, and it doesn't call any other
> function, and/or it doesn't generate any other events kindof a thing?
> on_button() is so simple that it never gets itself into trouble? I use it
> quite a bit like after setting the text of a status message field to make
> sure the message (and maybe a beep) gets displayed, though most of the time
> I call it on the item that I am writing to or working with (like
> Text().update() or Button().update(), and not Root.update()). B.update(),
> instead of Root.update() will also work in the example program.
More information about the Tkinter-discuss