Re: Win32Lib: how handle multiple Timers?
- Posted by Dan Moyer <DanMoyer at PRODIGY.NET> Sep 26, 1999
- 414 views
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