Hi Phil,
Now I tried to add a Timer to the example project I created.
When I "use" the unit ExtCtrls that defines the TTimer class, when compiling, I get the error message
"Error: Error while linking"
(with no further explanation).
Any Idea what exactly that means ?
Do you suggest that TTimer should work. I in fact did not expect it to work and thus I try to create an alternative TTimer (say "TExtTimer") by using a thread that inserts a message in the TFCGIApplication Message queue.
To from a Thread create an application Message that performs an Event in the Main Application, the RTL for TThread provides the "Synchronize" method. I tried to use that, but even if nothing is done in the synchronized mainthread-method it does not work: The synchronized method is not called and the thread hangs in "Synchronize()".
In fact I'm not really sure, what exactly we want TThread.Synchronize (and also TTimer) to do. As TFCGIApplication does not seem to use a dedicated Mainthread, but multiple threads, one for each incoming connection, which thread is supposed to act as a Mainthread that get the Queued events and is supposed to handle the events thrown by TTimer.OnTimer and TThread.Synchronize. Maybe an additional thread is needed for this (I klnow that MSEGUI provides a "NONGUIApplication" (or similar) that does something like this (a message queue in an Application that is not integrated ion a GUI framework). Does TFCGIApplication provide something similar or would it need to be enhanced to allow for things like *Timer and *Thread.Synchronize ?
I'd appreciate any comment on that....
-Michael