[Fwd: again TTimers, TApplication proces control]

From: Rutger van der Eijk (r36@nikhef.nl)
Date: Wed May 06 1998 - 10:53:36 MEST


For some reason this messages was not posted last week...


attached mail follows:


Hi, This is a message in reply/continueation to the messages from Andrej Filipcic from 27/3/98 with subject "TApplication & process control". I am also programming for a online monitoring system. I will have something like a event loop (to take data and monitor etc.) and in the meanwhile I want to be able to press buttons etc. From the above mentioned message I leared that using TTimers is a good solution to tackle this problem. I experience some problems when using this technique. The are probably related to my lake of knowledge about the use of timers. Questions: 1) What is the difference between a synchronous and an asynchronous timer? 2) What should I specify as return statement for the Notify functionmember (of my own sub-classed timer object (i.e. OTGTimer)) When do I use kTRUE and when kFALSE? 3) In the above example (in message) the timer is used to handle GUI input. What happens, if during 'handeling' the GUI input, the timer times out again (and optionally new GUI input is present)? My problems: I define a (async) timer class like in the above example. In my main program I define my own MainFrame class alike the guitest test example. Inside this mainframe I somewhere start a datataking loop by pressing a 'start' button. By using my timer class I want pressing the stop button to eventually stop the event loop (this is done by setting some variable (fEndLoop) on which is checked by the event loop) In case I add the timer inside the main program before starting the TApplication everything works fine. But when I add the timer just before I enter the event loop the timers Notify() is never called. Should I somehow activate the timer? I would appriciate any examples from people who also used timers to tackle similiar problems. Rutger van der Eijk



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:32 MET