in reply to Re^2: PerlTk Busy vs. update
in thread PerlTk Busy vs. update

If I've got this right, you're setting $main->Busy, calling $label->update, and seeing responses to events - like a buttonclick on another widget - occur when the child widget performs the update. Are you setting -recurse => 1 in the call to Busy?

(I always set that, except in exceptional circumstances, and so ass-u-me-d that $child->update would not affect $otherchild.)

Replies are listed 'Best First'.
Re^4: PerlTk Busy vs. update
by Anonymous Monk on Jul 02, 2004 at 14:51 UTC
    You've got it right, and I am setting -recurse=>1 but as pointed out below, the update acts globally.

    Does anyone know what the behavior of setting (un)Busy an already (un)Busy widget is "supposed" to be?

    I think this might be my problem.

      Is that with $top->update or $label->update?

      Contrary to the assertion that any update is global, the 2nd run of my test script shows that with Busy(-recurse=>1) and $label->update, the $button event was discarded. (On the Win98 and W2K boxen here, anyway.)

      Update: I'd changed two things at once while testing - the recurse option was solely responsible for causing the events to be discarded. Update is global.

      Also, idletasks is slightly different between the Win* and Linux boxen I use. On the Linux boxen there are no "leftover" characters after idletasks causes the label change to display.

        update() is global. I would be happy if this wouldn't be the case. There's no difference between $mw->update and $label->update.
        I was using $top->Busy(-recurse=>1) and $label->update() (on a Sun box). I've gone over to using $label->idletasks() and this seems to work.