Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » Invalid thread access
Invalid thread access [message #49722] Fri, 21 March 2003 08:55 Go to next message
Frank Radermacher is currently offline Frank RadermacherFriend
Messages: 33
Registered: July 2009
Member
Hi,

I'm experiencing the same "error/strange behaviour" as was mentioned in
the unresponded post "[SWT][Thread] Strange Exception" posted on
13/12/2002 19.18 in this NG.

In my environment there is a diff. Yhe same code works on w2k and causes
the mentioned error only on MAX OSX 10.2

Is somebody out there who has seen this problem and got rid of it
(without switching to swing ;-) )


Frank
Re: Invalid thread access [message #49963 is a reply to message #49722] Mon, 24 March 2003 15:36 Go to previous message
Eclipse UserFriend
Originally posted by: therier.yahoo.com

(I had pb with my post, hope this one works!)

This exception is thrown because you try to modify a GUI elment outside a
GUI thread.

To handle this problem use this:

Display display = Display.getCurrent();
if (display==null) display = Display.getDefault();

display.asyncExec( new Runnable(){

public void run(){
// Put your GUI modif. here.
}

});


Note that you could replace the asyncExec() by a syncExec()


"Frank Radermacher" <isag.srl@libero.it> a
Re: Invalid thread access [message #591910 is a reply to message #49722] Mon, 24 March 2003 15:36 Go to previous message
Eclipse UserFriend
Originally posted by: therier.yahoo.com

(I had pb with my post, hope this one works!)

This exception is thrown because you try to modify a GUI elment outside a
GUI thread.

To handle this problem use this:

Display display = Display.getCurrent();
if (display==null) display = Display.getDefault();

display.asyncExec( new Runnable(){

public void run(){
// Put your GUI modif. here.
}

});


Note that you could replace the asyncExec() by a syncExec()


"Frank Radermacher" <isag.srl@libero.it> a
Previous Topic:Importing project into workspace from external plugin
Next Topic:Why that "I*" (IResource, IJavaElement, ...)?
Goto Forum:
  


Current Time: Fri Dec 27 01:46:37 GMT 2024

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

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

Back to the top