Re: [fpc-pascal] TThread descendant with public events

2010-11-01 Thread Graeme Geldenhuys
Op 2010-11-01 11:06, Sven Barth het geskryf: > > The code is still run in the thread's context, no matter whether the > code is in your TThread class or e.g. a global procedure. So you should > use Synchronize to trigger the event. Thank you very much Sven and Martin. What you said then confir

Re: [fpc-pascal] TThread descendant with public events

2010-11-01 Thread Martin Schreiber
On Monday, 1. November 2010 09.57:21 Graeme Geldenhuys wrote: > Is this safe to do? > No. An onxx event is a tmethod. "Triggering" the event means calling the method -> it runs in context of the calling thread. Martin ___ fpc-pascal maillist - fpc-pa

Re: [fpc-pascal] TThread descendant with public events

2010-11-01 Thread Sven Barth
On 01.11.2010 09:57, Graeme Geldenhuys wrote: Hi, What is the rules regarding a TThread descendants and public events. I created a thread that has OnXXX events. These events are triggered in the Execute method of that event. Now my main event (which manages the application GUI) hooked into thes

[fpc-pascal] TThread descendant with public events

2010-11-01 Thread Graeme Geldenhuys
Hi, What is the rules regarding a TThread descendants and public events. I created a thread that has OnXXX events. These events are triggered in the Execute method of that event. Now my main event (which manages the application GUI) hooked into these event by implementing event handlers. Those ev