in reply to PerlTk Busy vs. update

I think you should switch of the 'busy state' for the update and switch back immediately after updating, so your code could look like this:

... $mw->Unbusy(); $mw->update(); $mw->Busy(); ...

Replies are listed 'Best First'.
Re^2: PerlTk Busy vs. update
by Anonymous Monk on Jul 02, 2004 at 15:03 UTC
    This seems to produce the desired behavior, but has the unfortunate side effect of a rather twitchy cursor and significant slow down (at least when running across the network) when I'm doing many updates in rapid succession (e.g. "Your job is 37% done", "Your job is 38% done", etc.)

    I think a combination of using idletasks()and making sure not to (Un)Busy an already (Un)Busy widget (by keeping a global indicator of the Busy state of the widget) seems to be working the way I had envisioned (although I'm still testing).

    Thanks all.

      If you may limit your application to Unix/X11, then you could make use of the Tk::InputO widget. This is basically a widget which takes input, but is invisible otherwise. You would put an InputO widget all over the application and put a cancel button on top of the InputO.

      But, unfortunately, this is Unix-only.