En/na A.J. Venter ha escrit:
So while it´s true that I don´t use FOutPut in this class -that is because I
want to be able to use it in the calling application.
Having explained this, does it clarify why the code looks as it does ?
Ok, but in your test program I think you don't give synchron
Doesn't the while loop in the Button1 click handler
block the main thread ? I remember that in Delphi, to
do these things, I needed to incorporate an
Application.ProcessMessage, which is not a very clean
solution. You could use the OnTerminate event of the
TThread class instead to re-enable your
>
> Mmmh, looking more closely to your code (I didn't before, I was just
> replying to the assertion that you call synchronize from the main
> thread) I don't think you should use synchronize at all (maybe a mutex
> to coordinate the access to FRunning, but even that may be overkill for
> a boolea
En/na A.J. Venter ha escrit:
The synchronize calls shouldn't be placed inside your TThreadedProcess
code... they should be used in the main application thread to provide
mutual exclusion for the shared visual components.
It's the other way round, at least in delphi: you call synchronize from
a t
> >
> > The synchronize calls shouldn't be placed inside your TThreadedProcess
> > code... they should be used in the main application thread to provide
> > mutual exclusion for the shared visual components.
>
> It's the other way round, at least in delphi: you call synchronize from
> a thread whe
En/na Tom Lisjac ha escrit:
On 2/3/06, A.J. Venter <[EMAIL PROTECTED]> wrote:
But the moment I try to use it in a simple test program, it throws an
async-reply exception, something I would normally only expect if threaded
code tried to update the display irectly.
Any ideas where my thinking we
On 2/3/06, A.J. Venter <[EMAIL PROTECTED]> wrote:
> But the moment I try to use it in a simple test program, it throws an
> async-reply exception, something I would normally only expect if threaded
> code tried to update the display irectly.
>
> Any ideas where my thinking went wrong ?
The synchr
Or am I just doing it the wrong way around ?
A very large part of my dayjob involves writing frontends to commandline
programs under linux, so of course I figured I could make my life a lot
simpler if I had an abstract class I could use to run processes in threads
and retrieve the output live in