in reply to Basic questions of Tk programming

Can you provide a link to the place you got the code from? Maybe we can get it removed or replaced with something that makes sense?

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

Replies are listed 'Best First'.
Re^2: Basic questions of Tk programming
by tybalt89 (Monsignor) on Jan 24, 2025 at 01:27 UTC

      BAH. Either I didn't super search back far enough or SS dropped the ball.

      A pity OP didn't read as far as Annonymonk's reply.

      Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

        ok this is interesting though, waitVisibility call hack

        #!/usr/bin/perl use strict; use warnings; use Tk; my $number = 1; my $mw = MainWindow->new; $mw->waitVisibility; my $label = $mw->Label(-textvariable =>\$number)->pack(); $mw->repeat(1000, [sub{ ${$_[0]}++; $label->update; }, \ $number] ); $mw->waitVisibility;

        displays an incrementing counter