1. Win32Lib: how handle multiple Timers?
- Posted by Dan Moyer <DanMoyer at PRODIGY.NET> Sep 26, 1999
- 418 views
Dave, How do you use multiple timers? I can see how to set up more than one, & how to kill individual ones, but I can't see how to make individual routines to respond to each separate timer, with just one onTimer event. (Sorry if I'm missing something obvious.) Thanks, Dan
2. Re: Win32Lib: how handle multiple Timers?
- Posted by David Cuny <dcuny at LANSET.COM> Sep 26, 1999
- 419 views
Dan Moyer wondered: > I can't see how to make individual routines to respond >to each separate timer, with just one onTimer event. The onTimer trap passes back the id of the timer that was triggered. For example: -- set up some ids constant Timer1 = 1, Timer2 = 2, Timer3 = 3 MyWindow_Timer( integer id ) if id = Timer1 then -- timer 1 code elsif id = Timer2 then -- timer 2 code elsif id = Timer3 then -- timer3 code end if end procedure onTimer[MyWindow] = routine_id("MyWindow_Timer") Did that answer the question? -- David Cuny
3. Re: Win32Lib: how handle multiple Timers?
- Posted by Dan Moyer <DanMoyer at PRODIGY.NET> Sep 26, 1999
- 404 views
- Last edited Sep 27, 1999
Dave, Yep! Thanks, I was afraid it was obvious when I posted! Dan On Sun, 26 Sep 1999 12:36:27 -0700, David Cuny <dcuny at LANSET.COM> wrote: >Dan Moyer wondered: > >> I can't see how to make individual routines to respond >>to each separate timer, with just one onTimer event. > >The onTimer trap passes back the id of the timer that was triggered. For >example: > > -- set up some ids > constant > Timer1 = 1, > Timer2 = 2, > Timer3 = 3 > > MyWindow_Timer( integer id ) > if id = Timer1 then > -- timer 1 code > elsif id = Timer2 then > -- timer 2 code > elsif id = Timer3 then > -- timer3 code > end if > end procedure > onTimer[MyWindow] = routine_id("MyWindow_Timer") > >Did that answer the question? > >-- David Cuny