Problems? Is your data what you think it is? | |
PerlMonks |
Re^5: Dynamically Filling Text Box from Perl Tkby zentara (Archbishop) |
on Nov 07, 2011 at 22:46 UTC ( [id://936604]=note: print w/replies, xml ) | Need Help?? |
I still can't run the code, because of Excel, and an incomplete example, but from what I can gather from your problem, is you think tying STDOUT to the text widget is the only way to print to it. As choroba mentions below, the normal way to print to a text widget, is to do inserts. Also depending on what the module product_search does, it MAY render the Tk GUI's eventloop screwed up. You might want to make product_search operate in a separate thread, or put it in a standalone script, or run it thru IPC::Open3 or a piped open and collect the results back thru Tk's fileevent. Then you can decide when you want to write these results to the text widget, with an $txt->insert( 'end', $result ); Here is a simple example showing the concepts I described.
I'm not really a human, but I play one on earth. Old Perl Programmer Haiku ................... flash japh
In Section
Seekers of Perl Wisdom
|
|