Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Problem with Shell.close()
Problem with Shell.close() [message #456695] Tue, 07 June 2005 08:12 Go to next message
Thomas is currently offline ThomasFriend
Messages: 151
Registered: July 2009
Senior Member
Hello,

I have written a simple eclipse plugin which creates its own shell, i.e

-----
Display display = Display.getCurrent();
Shell shell = new Shell(display);
...
...
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
-----

I have a simple Exit Action which looks like,
-----
class ExitAction extends Action {
public ExitAction() {
super("Exit");
}
public void run() {
shell.close();
}
}
-----

When I close the application using this action, the eclipse instance
crashes with a nice showsplash message (showsplash 600). Closing it using
the 'X' in the upper right corner works beautifully. What could be wrong
here?

Best Regards
-Thomas
Re: Problem with Shell.close() [message #456698 is a reply to message #456695] Tue, 07 June 2005 08:53 Go to previous message
Thomas is currently offline ThomasFriend
Messages: 151
Registered: July 2009
Senior Member
Forget this.
The action wasn't used, another listener was used which called
System.exit(1);
...
Excuse me.
Previous Topic:Problem with SWT application under Mac OS X
Next Topic:[How to] SWT -> Listeners for MenuItem
Goto Forum:
  


Current Time: Fri Mar 29 12:38:35 GMT 2024

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

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

Back to the top