Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Tk won't output until finished

by Athanasius (Monsignor)
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 contemplating the Monastery: (15)
As of 2014-09-16 19:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (44 votes), past polls