in reply to Re: need a popup gui stdin
in thread need a popup gui stdin
errors on the below line Can't call method "setgrid" on an undefined value at
$lab_pass -> grid(-row=>2,-column=>1);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: need a popup gui stdin
by AnomalousMonk (Archbishop) on May 25, 2012 at 01:12 UTC | |
errors on the below line ... This is code from jack123's reply, not zentara's. Try fixing the former code – it can be fixed – and running it; it may throw light on what you need. Or else try zentara's code, with which I have not experimented, but in which I would have more confidence. | [reply] [d/l] |
by diamondsandperls (Beadle) on May 25, 2012 at 17:04 UTC | |
There is something I am missing I believe I have finally got some code to work as far as supplying the gui and text box with submit button and i have verified the input and everything is getting stored to the $text variable. But there is no more processing of teh remainder of the code which if i comment the block out it will process the remainder of teh code but I HAVE to have stdin with a gui. below is my current code after i hit submit there is no more processing of remaining code.
| [reply] [d/l] |
by AnomalousMonk (Archbishop) on May 25, 2012 at 23:34 UTC | |
diamondsandperls: I know how to re-direct STDOUT and STDERR so as to make functions like print() and printf() output to, e.g., a Text box. I do not know how to do anything similar with STDIN and I am not even sure it is meaningful to talk of doing such a thing (Update: from within the MainLoop)! Can you describe in greater detail what it is you hope to accomplish with your program? What is the nature of the data that STDIN is supposed to provide? | [reply] [d/l] [select] |
by AnomalousMonk (Archbishop) on May 26, 2012 at 03:54 UTC | |
After playing around a bit, here's an example of STDIN accessibility both before and after the MainLoop function. I don't know how kosher this may be. Again, this code is launched from the command line.
| [reply] [d/l] [select] |
by zentara (Cardinal) on May 29, 2012 at 13:50 UTC | |
You must destroy the MainLoop with $mw->destroy for processing to continue. Now, after $mw->destroy, any code after the MainLoop line will start to run, as I showed in Re: need a popup gui stdin You can then take $text, and run any code you want using it. However, if you have an external program, which you want to feed $text to on it's STDIN, you have a few choices. One is to run system or exec, with $text as an argument. Like this:
I'm not really a human, but I play one on earth. Old Perl Programmer Haiku ................... flash japh | [reply] [d/l] [select] |