Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Problem with shell close
Problem with shell close [message #135767] Thu, 11 June 2009 10:40 Go to next message
NkD Missing name is currently offline NkD Missing nameFriend
Messages: 61
Registered: July 2009
Member
I need shell, which is automatically close, if user click out of them.

In Rap1.1.2 working, but in Rap1.2.rc4 not:

shell.addShellListener(new ShellAdapter() {
@Override
public void shellDeactivated(ShellEvent e) {
shell.close();
}
});

in Rap1.2.rc4 I try fixed:

shell.addShellListener(new ShellAdapter() {
@Override
public void shellDeactivated(ShellEvent e) {
Display.getCurrent().asyncExec(new Runnable() {
@Override
public void run() {
shell.close();
}
});
}
});

it is work... but I dont understand why.
Re: Problem with shell close [message #135875 is a reply to message #135767] Fri, 12 June 2009 10:02 Go to previous message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
please see this bugs:

278996: [Shell] Stackoverflow when closing child shell
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278996

229309: StackOverflow when widget disposes of its
parent while itself in dispose
https://bugs.eclipse.org/bugs/show_bug.cgi?id=229309

In comment 5 of the first bug report there is a workaround described.

HTH
Rüdiger


Michal NkD Nikodím wrote:
> I need shell, which is automatically close, if user click out of them.
>
> In Rap1.1.2 working, but in Rap1.2.rc4 not:
>
> shell.addShellListener(new ShellAdapter() {
> @Override
> public void shellDeactivated(ShellEvent e) {
> shell.close();
> }
> });
>
> in Rap1.2.rc4 I try fixed:
>
> shell.addShellListener(new ShellAdapter() {
> @Override
> public void shellDeactivated(ShellEvent e) {
> Display.getCurrent().asyncExec(new Runnable() {
> @Override
> public void run() {
> shell.close();
> }
> });
> }
> });
>
> it is work... but I dont understand why.
Previous Topic:Problem with selection in Table
Next Topic:Problem with style - padding
Goto Forum:
  


Current Time: Mon Dec 06 12:36:23 GMT 2021

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

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

Back to the top