rianmonnahan <
rian.m...@gmail.com> wrote:
> Hi all,
> I'm running Active Tcl/tk patchlevel 8.6.3 on a MacOS 10.10.
> I'm working through some of the examples in Practical Programing in
> Tcl and Tk.
> Specifically, I'm working on example 12-6.
> ...
> #***** THIS IS THE PB *****#
> update
> #update idletasks ;# DOES NOT WORK
>
> after 500
> }
> Welch suggests using "update idletask" for force the geometry manager
> to redraw the screen after each interration of pack. This to show the
> effects of different anchor values.
> Well, it does not work. If you run the code with "update idle," you
> will set the variables change in the terminal window but the main
> (graphical) window will not be updated until the program exits the
> foreach loop.
Seems to work perfectly on Linux with Slackware 13.37's Tcl/Tk 8.5.9
here. And seems to perform the exact same operation with either of
"update idle" or "update".
> If you use update (a no-no, I'm hear),
For normal code, yes. For demos where you want to see the effect
change as you tweak things, it is usually not an issue. And for this
demo code, running plain "update" is no issue at all.
> Any ideas on better ways to force a refresh in this context?
I see no problems on my end running the code, so you are obviously
getting something different from what I see here.