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

Interesting. I'm getting a window with no counter which disappears after a fraction of a second. Also,
$ cksum 1.pl 384604483 267 1.pl
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^8: Basic questions of Tk programming
by Don Coyote (Hermit) on Jan 31, 2025 at 17:51 UTC

    it seems just calling waitVisibility twice instantiates a simple PTk window

    #!/usr/bin/perl use strict; use warnings; use Tk; my $mw=MainWindow->new; $mw->waitVisibility; $mw->waitVisibility;
Re^8: Basic questions of Tk programming
by Don Coyote (Hermit) on Jan 31, 2025 at 16:51 UTC
    $ cksum 1.pl 584056581 267 1.pl

    Well, yes waitVisibility is very temperamental, doesn't behave in any coordinated fashion that I can percieve.

    But for me in this case it displays, most of the time I get a flicker and a flash and dissappearing act.

    Both calls are needed and in the position they are in linewise.

    Then again I get a lot of trouble trying to tell my geometry managers to display, so i may just be using an old buggy version.

    I can remove the $label->update; term from the sub as it is a referenced value to the -textvariable option.