Timer in DWT?

Frank Benoit keinfarbton at googlemail.com
Mon Sep 8 02:40:30 PDT 2008


Bill Baxter schrieb:
> On Mon, Sep 8, 2008 at 4:42 PM, Sam Hu <samhu.samhu at gmail.com> wrote:
>> Hi Frank,
>>
>> Just a stupid question:is there a timer control in DWT?If no,then how to implement the same ?
>>
>> Thanks,
>> Regards,
>> Sam
>>
> 
> What's a timer control in your parlance?
> Is that like a progress meter?
> Or do you mean just a timer object that can trigger a callback after a
> fixed interval (and not a GUI control)?
> Or something else?
> 
> --bb

I would understand that as the callback thing.
There is in dwt.widgets.Display
public void timerExec(int milliseconds, Runnable runnable)

Search through the dwt-samples and you will find several hits.

Tip: Use the dgRunnable template function:
Display.getCurrent.timerExec( 500, dgRunnable({
  // handler code
}));




More information about the Digitalmars-d-dwt mailing list