Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » SWT Error
SWT Error [message #300663] Tue, 14 March 2006 17:07 Go to next message
Eclipse UserFriend
Originally posted by: vik_ram.hotmail.com

Hi,
I am trying to populate an SWT Table with data coming from an object
that is running in a different thread. ( CORBA Object )

I get the following exception :

org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:2942)
at org.eclipse.swt.SWT.error(SWT.java:2865)

when I try to write the data into the table.

Thanks in advance.
Re: SWT Error [message #300665 is a reply to message #300663] Tue, 14 March 2006 18:09 Go to previous message
Eclipse UserFriend
Originally posted by: kwpeck.mersoft.com

Try something similar to this which forces your updates to be called on
the proper thread for the SWT widget.

Display display = viewer.getTree().getDisplay();
display.asyncExec (new Runnable () {
public void run () {
if (viewer.getTree().isDisposed()) return;
viewer.setSelection(selection, true);
}
});

vikram wrote:
> Hi,
> I am trying to populate an SWT Table with data coming from an object
> that is running in a different thread. ( CORBA Object )
>
> I get the following exception :
>
> org.eclipse.swt.SWTException: Invalid thread access
> at org.eclipse.swt.SWT.error(SWT.java:2942)
> at org.eclipse.swt.SWT.error(SWT.java:2865)
>
> when I try to write the data into the table.
>
> Thanks in advance.
>
>
Previous Topic:Nightly build
Next Topic:ant rebuild updated files problem
Goto Forum:
  


Current Time: Fri Jul 18 04:43:06 EDT 2025

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

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

Back to the top