Delegate Subs in REALBasic 5.5

  1. make a new Interface - TimerEventHandler
    add to it several methods that implementors must implement - I’d suggest on per Timer event

  2. make a new subclass of timer - DelegatingTimer

  3. add a protected property to this new subclass - m_Handler as TimerEventHandler

  4. in this new timer add a Constructor that takes an instance of TimerEventHandler

     Constructor( eventHandler as TimerEventHandler)
          m_Handler = eventHandler

4) in the new subclass add EVERY event it has
in each you basically just forward the event to the delegate - m_eventHandler



now you can create anything to implement that interface
and create timers in code that call the implementor