in reply to Perl/Tk and "wait" box

Replies are listed 'Best First'.
Re: Re: Perl/Tk and "wait" box
by Ven'Tatsu (Deacon) on Aug 17, 2001 at 05:47 UTC
    You can display and update TK windows without ever using MainLoop()
    There are two methods you can call to do this $widget->idletasks; and $widget->update; idletasks will not take new input into account, update will.
    You can look at the Tk::Widget docs to find out more about them.
Re: Re: Perl/Tk and "wait" box
by Anonymous Monk on Aug 17, 2001 at 20:44 UTC
    OK, with some tweaking the wait box and your code suggestion runs fine - however there seems to be an issue with Tk::WaitBox and it's "cancel" button feature - ie, the button displays, but it's unclickable - the mouse cursor sits on an hourglass when it's over the box, can't click anything.

    I've been trying to create my own wait box, but for some reason I'm running into a similar problem I had before - except this time it seems to be bypassing the "connect" sub completely and just displays my wait box.

    further suggestions appreciated.

    Thanks,

    Glenn

Re: Re: Perl/Tk and "wait" box
by Anonymous Monk on Aug 17, 2001 at 19:17 UTC
    Hmm, interesting method. However, with my code it causes an invalid page fault in perl56.dll (using ActivePerl build 628). I'm going to play around with it, as it's entirely possible it's my code - the "connect" sub in my case fork()'s a couple of other subs found later in the code (this works the way I had it before).

    Anyway, I'll keep playing.

    Thanks,

    Glenn