threading problem with TableTreeViewer.refresh() [message #439119] |
Tue, 06 July 2004 09:06 |
Eclipse User |
|
|
|
Originally posted by: lshan.imail.eecs.berkeley.edu
Hi,
I wondering in what thread should i call TableTreeViewer.refresh().
Following the source code, the refresh() eventually calls the following
method in Widget class to do the thread checking. If the thread that calls
refresh() is the correct thread, it issues invalid access error.
protected void checkWidget () {
Display display = this.display;
....
if (display.thread != Thread.currentThread ()) error
(SWT.ERROR_THREAD_INVALID_ACCESS);
....
}
I am implementing a listener and want to call TableTreeViewer.refresh() when
something changes in my model. What's the correct way to make such a call?
Thanks a million.
Lexin Shan
|
|
|
Re: threading problem with TableTreeViewer.refresh() [message #439170 is a reply to message #439119] |
Tue, 06 July 2004 14:10 |
Eclipse User |
|
|
|
Originally posted by: richkulp.NO.SPAM.us.ibm.com
This means you are calling from some thread other then the display
thread. If you are not on the display thread, you need to use
Display.asyncExec() or Display.syncExec() to get the refresh() to be
called on the display thread.
--
Thanks, Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.02837 seconds