SWT_AWT Popup menu problem [message #327969] |
Sat, 10 May 2008 18:19 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: asf14.yahoo.com
Hi
I've been stuck on this problem for a while. I am writing an graph
editor using jgraph as an eclipse editor plugin. I use SWT_AWT.newFrame
to attach the swing component onto eclipse. My problem now is how to
implement popup menus associated with mouse clicks.
When I simply create a SWT menu when a mouse right click occurs, I get a
org.eclipse.swt.SWTException: Invalid thread access.
I tried to pass the composite from the SWT_AWT.newFrame(composite) and run
composite.getShell().getDisplay().syncExec( new Runnable() {
public void run(){
Menu menu = new Menu(composite.getShell());
etc etc
}
}
I still get a thread error msg
Does anyone know how to approach this problem ?
Any help will be greatly appreciated,
David
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03154 seconds