Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Tk won't output until finished

by Athanasius (Abbot)
on Jan 29, 2013 at 15:55 UTC ( #1015895=note: print w/ replies, xml ) Need Help??


in reply to Tk won't output until finished

The following seems to work correctly:

sub check_card { my $cardno = $card->get(); if (length $cardno == 0) { error_no_card(); } elsif (length $cardno > 0) { $mw->Label ( -text => "\nChecking Account Details for '$cardno'.\n Ple +ase Wait......\n", -width => 54, )->pack(); $mw->update; my $exists = check_in_SQLStore($cardno); print "We got nothing\n" unless $exists; } }

That is, call $mw->update; immediately after creating the label.

See, for example, the recent thread Perl/Tk window contents disappear when obscured then revealed.

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,


Comment on Re: Tk won't output until finished
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1015895]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2015-07-30 07:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls