"Swingle David-QWHM86" <dswin...@motorola.com> wrote:
> In the following code snippet, I use 'repeat' to call a subroutine
> (UpdateCurrentProgress()) once every 100ms.  Is there something
> equivalent in Perl/Tkx?

No, but it's easy to roll your own:

    # Emulate Perl/Tk's repeat() method
    sub repeat {
        my $ms  = shift;
        my $sub = shift;
        my $repeater; # repeat wrapper
        
        $repeater = sub { $sub->(@_); Tkx::after($ms, $repeater); };
        
        Tkx::after($ms, $repeater);
    }

And then use it like this:

    repeat(100, \&UpdateCurrentProgress);

-mjc

Reply via email to