Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » threading problem with TableTreeViewer.refresh()
threading problem with TableTreeViewer.refresh() [message #439119] Tue, 06 July 2004 09:06 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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

Previous Topic:No more handles error
Next Topic:WebStart?
Goto Forum:
  


Current Time: Sat Apr 27 04:23:02 GMT 2024

Powered by FUDForum. Page generated in 0.02837 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top