Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Greeting. I posed this question

Status
Not open for further replies.

Bong

Programmer
Dec 22, 1999
2,063
US
Greeting.

I posed this question on Scriptic's Tclrs Wiki (I don't really like that name) and got a response that I couldn't make work. Anyway, this forum seems more responsive so I'll try here:

I have a script that is computationally intensive. In this case it's a polynomial fit to a lot of data but it could also be anything that takes a lot of time. The user pushes a button and the script cranks. I know the script is working because the button remains depressed but I have received complaints from users that they want a "busy signal" like an hour glass or something. I have tried a couple of things but the problem is nothing is executed until the process returns (at which point I don't need it).

So for instance, I have a button on my MAIN menu:
button $w.nxt -text generate\nUEM -command uem2 -activebackground white

uem2 is the proc that executes the time consuming computation. There are a lot of PROCs called by uem2 but I imagine the problem is not in which PROC I'm trying to show as busy but that I don't know how to do it at all. [Note, I use the activebackground to at least make it seem like I know it's working. If there was an -activebackground blink, say, that would do it.] Bob Rashkin
rrashkin@csc.com
 
Is there any
Code:
update
command anywhere in your code?
Without it your computations gobble the CPU without a chance for interactive events.

ulis
 
Ulis,
Actually, no. I only recently learned about "update". Any advice on where to sprinkle them? Bob Rashkin
rrashkin@csc.com
 
It wouldn't hurt to take a look a the -progress argument
code in the tcl_http/http_get library and decide if you can include the same idea somehow in your script.


Good Luck.
 
You can add
Code:
update
somewhere in your main loop, where you think it would be a good place to push the button.

ulis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top