in reply to Re^2: Basic questions of Tk programming
in thread Basic questions of Tk programming

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
  • Comment on Re^3: Basic questions of Tk programming

Replies are listed 'Best First'.
Re^4: Basic questions of Tk programming
by Don Coyote (Hermit) on Jan 30, 2025 at 22:39 UTC

    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

      > displays an incrementing counter

      When you append a MainLoop();, yes, it does.

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

        > displays an incrementing counter

        >> When you append a MainLoop();, yes, it does.

        SoPW_11163888_a1_p2_cksum 3105190772.pl with trailing newline cksum 1809475538 without trailing newline.

        That is why this is interesting, I get a display without any mention of MainLoop in my script.

        Something brewing in the bug dept, or more likely Mainloop is being implicitly called?