widget updating issue
- From: "cmurphy" <murphycc@xxxxxxxxx>
- Date: 11 Oct 2006 09:08:35 -0700
Hi folks,
I discovered something about TCL the other day that I did not know
before. I have a frame with a number of labels, entries and buttons.
When the "Update" button is pressed I execute a linux rsh command to
log onto 6 other linux hosts to check what jobs are running and how
many processors are free. It takes about 8 seconds for the loop of 6
rsh commands to finish, after which certain variables are changed and
updated in the TK frame containing the data.
The issue is that I would like each variable to REFLECT ITS CHANGED
VALUE IN THE FRAME as soon as the variable is changed in the loop or
procedure I am calling. In other words, in the loop I call which shoots
6 rsh commands to those other hosts, variables are updated after each
host is queried. But the frame does not reflect those values until the
entire 8 second loop is complete, even though the individual variables
change at times before 8 seconds.
I have the "Practical Programming..." book by Welch and Jones, and that
has answered 99% of my questions except for this one. Do I need to use
the VWAIT command, which checks for variables changing state? Also, is
this an inherent issue with TCL/TK that frames/widgets can never be
updated until a loop or procedure is exited?
Another related behavior of TCL/TK I notice is that I can create and
pack my widgets, but the GUI will not appear on the screen if I have
other (non-TK) code that still needs to execute. That occurs in this
same program because I kick off the 6 rsh queries during the initial
program startup, so even though the widget creation and packing occurs
in order before the rsh loop starts, the frame will not appear until
the queries are done. This seems odd to me. It tells me that TCL only
displays frames when all other commands are done executing, and that
the only way around this is to bind those "other" commands to buttons
in the GUI.
If anyone understands this, please help.
Thanks,
-Chris
.
- Follow-Ups:
- Re: widget updating issue
- From: Neil Madden
- Re: widget updating issue
- From: Robert Heller
- Re: widget updating issue
- Prev by Date: Re: list drilldown
- Next by Date: Re: Tablelist bindings
- Previous by thread: "gets" at work
- Next by thread: Re: widget updating issue
- Index(es):