Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2017-03

TThread.OnTerminate ?

7 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

fredvs
to Michael Van Canneyt: You miss it. It exists and it is even documented:…

Oops, I did not see your answer.
Thanks Michael.

My original bug was that I did:

MyThread = class(TThread)
...
procedure OnTerminate ;
...

It was not working, of course because OnTerminate is a procedure of object:

procedure OnTerminate(sender: Tobject); ---> This solve all.

Fre;D

-----
Many thanks ;-)

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/TThread-OnTerminate-tp5727888p5727909.html Sent from the Free Pascal - General mailing list .

Reply by email

fredvs
to fredvs
procedure OnTerminate(sender: Tobject); ---> This solve all.

Not sure. ;-(

Hello.

It is me again.

I am loosed.

If I do :

MyThread : = class(TThread);
...
procedure OnTerminate(sender: Tobject); override;
...

There is a error message:

Error: (3058) There is no method in an ancestor class to be overridden: "OnTerminate(TObject);"

;-(

Fre;D

-----
Many thanks ;-)

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/TThread-OnTerminate-tp5727888p5727910.html Sent from the Free Pascal - General mailing list .

Reply by email