Re: [Lazarus] Creating TProcess from within a TThread

2015-04-28 Thread Richard Mace
Thanks Mattias,
I should have guessed that
Richard
On 28 Apr 2015 13:14, "Mattias Gaertner"  wrote:

> On Tue, 28 Apr 2015 13:10:33 +0100
> Richard Mace  wrote:
>
> > Hi,
> > I am currently working on a project that will need to use multiple
> threads
> > which will each need to create their own TProcess.
> >
> > Is this possible as when I attempt it at the moment, tprocess requires a
> > tcomponent when created?
>
> You can pass nil:
> aProcess:=TProcess.Create(nil);
>
> Mattias
>
> --
> ___
> Lazarus mailing list
> Lazarus@lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Creating TProcess from within a TThread

2015-04-28 Thread Michael Van Canneyt



On Tue, 28 Apr 2015, Richard Mace wrote:



Hi,
I am currently working on a project that will need to use multiple threads 
which will each need to create their own TProcess.

Is this possible as when I attempt it at the moment, tprocess requires a 
tcomponent when created?


Just pass Nil as the Owner. Do not forget to free it then.

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Creating TProcess from within a TThread

2015-04-28 Thread Mattias Gaertner
On Tue, 28 Apr 2015 13:10:33 +0100
Richard Mace  wrote:

> Hi,
> I am currently working on a project that will need to use multiple threads
> which will each need to create their own TProcess.
> 
> Is this possible as when I attempt it at the moment, tprocess requires a
> tcomponent when created?

You can pass nil:
aProcess:=TProcess.Create(nil);

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Creating TProcess from within a TThread

2015-04-28 Thread Richard Mace
Hi,
I am currently working on a project that will need to use multiple threads
which will each need to create their own TProcess.

Is this possible as when I attempt it at the moment, tprocess requires a
tcomponent when created?

Thanks

Richard
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus