|
|
|
|
Re: Display.setFocusControl in RAP [message #817012 is a reply to message #816916] |
Fri, 09 March 2012 14:31 |
|
As a workaround, you can probably use display.asyncExec from the focus listener to dispose the control. That should let the focus event finish processing before the control gets disposed.
Control control;
...
public void focusLost(FocusEvent event) {
control.getDisplay().asyncExec(new Runnable(){
// make sure something else didn't dispose it
if (control != null && !control.isDisposed()){
control.dispose();
}
});
}
|
|
|
Re: Display.setFocusControl in RAP [message #817017 is a reply to message #816916] |
Fri, 09 March 2012 14:31 |
|
As a workaround, you can probably use display.asyncExec from the focus listener to dispose the control. That should let the focus event finish processing before the control gets disposed.
Control control;
...
public void focusLost(FocusEvent event) {
control.getDisplay().asyncExec(new Runnable(){
// make sure something else didn't dispose it
if (control != null && !control.isDisposed()){
control.dispose();
}
});
}
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02961 seconds