On Thu, 24 Mar 2005 10:19:12 +0000 herald kevin <k526816@...> wrote:
> I'm currently developing an application using wxPerl and a problem in using
> wxProcess and wxInputStream. I do not know how to describe it percisely but
> i will try to explain it.
> After my application invoke wxProcess to run an executable file and redirect
> it. I use wxProcess::GetInputStream to store the wxInputStream to a
> variable. There is always output every few second from the executable file
> that i run using wxProcess.
> However, it seems that i can only get protion of it through the
> wxInputStream. The wxInputStream seems to block until it has store up
> certain amount of data in the stream before i can continue to read from it
> I have tried to use wxProcess::IsInputAvailable() but it return FALSE to me
> which in fact there is data in the wxInputStream.
> Below is a short portion of my code
> $stream = $$curProcess->GetInputStream();
> if ($stream ne NULL)
> while ($dataAvail)
> $dataAvail = $$curProcess->IsInputAvailable();
> sysread($stream , $buffer , 1);
> Is there any solutions in solving this so that wxInputStream no longer block
> when reading from a wxProcess? I am looking for a solution to update the
> data in real time but this problem would cause a trouble.
I do not know the answer to your question, but I redirected your
message to the wxperl-users mailing list. Hopefully someone there
has some helpful suggestions for your problem.
Get latest updates about Open Source Projects, Conferences and News.