Skip to main content



      Home
Home » Newcomers » Newcomers » SWT.close exits entire app when not at top level
SWT.close exits entire app when not at top level [message #127643] Thu, 05 January 2006 03:13 Go to next message
Eclipse UserFriend
Originally posted by: go.away.com

hi-

i am having such a dificult time with my application windows.
can anyone give me a tip on how to make sure that closing a dialog shell
doesnt kick me out of the entire program?
all of the shell disposed listeners fire and i only wanted to close the one
shell.
isnt there a way to identify that specific shell and say close or dispose
without this cascading effect?

thanks very much,
jim
Re: SWT.close exits entire app when not at top level [message #127698 is a reply to message #127643] Thu, 05 January 2006 05:24 Go to previous message
Eclipse UserFriend
Originally posted by: go.away.com

hi-

i think i found my error (almost certain).
i will test it out tomorrow. i need some sleep.

Display display =parent.getDisplay();
// Set up the event loop.
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
// If no more entries in event queue
display.sleep();
}
}

//display.dispose();

when i commented out this display.dispose() it ran fine.
only the main (top level) dialog needs the commented out line
(display.dispose();) i believe.
the other dialog shells can get by without it.




"3rdshiftcoder" <go@away.com> wrote in message
news:dpikgi$12j$1@utils.eclipse.org...
> hi-
>
> i am having such a dificult time with my application windows.
> can anyone give me a tip on how to make sure that closing a dialog shell
> doesnt kick me out of the entire program?
> all of the shell disposed listeners fire and i only wanted to close the
> one shell.
> isnt there a way to identify that specific shell and say close or dispose
> without this cascading effect?
>
> thanks very much,
> jim
>
Previous Topic:Cannot create a new project
Next Topic:Full Build on XML file edit?
Goto Forum:
  


Current Time: Sat May 10 09:17:34 EDT 2025

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

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

Back to the top