Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Two Window Apps dispose question
Two Window Apps dispose question [message #153939] Wed, 24 May 2006 21:12
Eclipse UserFriend
Originally posted by: nnikonova.yahoo.com

Hi,

I am working on an IDE type application. I have added a custom main menu
option to our workbench and when the user selects this option a new window
("Host Manager" window) needs to open up. The IDE window extends
ApplicationWindow. The "Host Manager" window currently also extends
ApplicationWindow class. Here are my questions:
1. Does the main IDE window needs to be a parent of the "Host Manager"
window? If yes, then why?
2. When I close the Host Manager window, the application crashes with the
following exception:
Widget is disposed
Unhandled event loop exception

Here is a snippet of code I have in the HostManager's run method:

public void run()
{
// don't return from open() until window is closed
setBlockOnOpen(true);

// open the main window
open();

// dispose the display
Display.getCurrent().dispose();
}

I think there is a problem with calling Display.getCurrent().dispose()
from the "Host Manager" window. However, if I completely omit this line
of code, I am not sure if all the necessary cleanup is being performed.
What's the best way to handle the cleanup of the shell and the widgets
that are part of the shell without deleting the Display?

Thanks,
Natalia
Previous Topic:where to look for plugin maifest parsing?
Next Topic:changing C++ compiler for CDT?
Goto Forum:
  


Current Time: Fri Apr 19 15:54:39 GMT 2024

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

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

Back to the top