I'm not a Tkx guru, but you should never use "sleep" in a GUI app, as it will interfere with the eventloop. As others have pointed out, you can hack around a sleep statement usage, with "$mw->updates" sprinkled around, but that is a poor way to write the code.
Almost always, you avoid the problem by setting up a timer, rather than use sleep. Try taking the sleep(1) out of your code, and see if that speeds up the text inserts. A timer in Tkx would look something like the following.
See Tkx repeat in case you are forced to use after to simulate repeat. I don't know if Tkx has a repeat
# untested pseudocode
sub start{
my @ids = (1..10);
# repeat may not be available in Tkx.... see link above
Tkx::repeat(1000, sub {
my $id = shift @ids;
if ($id <= 10){
$txt_processed_domains->configure(-state => "normal");
$txt_processed_domains->insert_end( "$id => Available\n" );
$txt_processed_domains->configure(-state => "disabled");
}
else { Tkx::tk___messageBox( -message => "Completed!" ); }
});
}
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.