Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: PerlTk Busy vs. update

by Crian (Curate)
on Jul 02, 2004 at 09:22 UTC ( [id://371342]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://371342]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-23 15:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found