timerExec problem in dwt-win

Frank Benoit keinfarbton at googlemail.com
Sun Sep 28 04:54:10 PDT 2008

torhu schrieb:
> This test doesn't print "OK" like I think it should, it just prints
> "ctor called".  It seems that timerExec doesn't work when called from
> other threads than the GUI thread.  The SWT docs seem to say that this
> should work.  Am I doing something wrong?
> When doing the same thing in my real DWT app, I get an "Invalid thread
> access" exception, but I haven't put an exception handler into the
> secondary thread in this sample.

You get the same exception also in your example code, but it is not
catched, so the message got lost.

You need to wrap your code in the Thread into another
display.asyncExec( dgRunnable({}));

More information about the Digitalmars-d-dwt mailing list