Multi-threaded and org.eclipse.widgets.Display [message #448181] |
Wed, 05 January 2005 01:21 |
Eclipse User |
|
|
|
Originally posted by: al_rody.hotmail.com
I am new with SWT and using multi-threaded on one single Display. I found
that only a thread that create a Display can accessed its own Display
instance by Display.getCurrent(), while the others can't, except use
Display.getDefault(), is that correct?
Because, when i use other thread that does not create Display to do
"draw2d.Figure.setBackgroud()", I got NullPointerException from
org.eclipse.draw2d.DeferredUpdateManager.queueWork() because it uses
Display.getCurrent() to obtain Display instance.
The question is how can I do as Eclipse SWT API said "(To support
multi-threaded user-interface applications, class Display provides
inter-thread communication methods which allow threads other than the
user-interface thread to request that it perform operations on their
behalf.)"
Regards,
rody
|
|
|
|
Powered by
FUDForum. Page generated in 0.04348 seconds