Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsPageBook on FormDialog
https://www.eclipse.org/forums/index.php/mv/msg/842948/1458293/#msg_1458293
We have a little case where we put SWT Text component on PageBook which
reside on a FormDialog. When focus in on the Text and user presses Enter
key a Widget is disposed exception is thrown.
button.addSelectionListener
(
new SelectionAdapter()
{
private static final long serialVersionUID = 8745498441542541616L;
@Override
public void widgetSelected(SelectionEvent e)
{
FormDialog dialog = new FormDialog(container.getShell())
{
private static final long serialVersionUID = -8404073274862848632L;
@Override
protected void createFormContent(IManagedForm managedForm)
{ Composite parent = managedForm.getForm().getBody();
parent.setLayout(GridLayoutFactory.fillDefaults().create());
FormToolkit toolkit = managedForm.getToolkit();
Composite composite = toolkit.createComposite(parent);
composite.setLayout(GridLayoutFactory.fillDefaults().create());
composite.setLayoutData(GridDataFactory.fillDefaults().grab(true,true).create());
PageBook pageBook = new PageBook(composite, SWT.NONE);
pageBook.setLayout(GridLayoutFactory.fillDefaults().create());
pageBook.setLayoutData(GridDataFactory.fillDefaults().grab(true,false).create());
toolkit.adapt(pageBook, true, true);
Composite page = toolkit.createComposite(pageBook);
page.setLayout(GridLayoutFactory.fillDefaults().create());
page.setLayoutData(GridDataFactory.fillDefaults().grab(true,true).create());
Text text = toolkit.createText(page, null);
text.setLayoutData(GridDataFactory.fillDefaults().grab(true,false).create());
pageBook.showPage(page);
}
};
dialog.open();
}
}
);
If we remove the PageBook all works fine.
Any help would be greatly appreciated.
Regards,
Setya]]>Setya Nugdjaja2014-11-01T07:28:01-00:00Re: PageBook on FormDialog
https://www.eclipse.org/forums/index.php/mv/msg/842948/1465205/#msg_1465205
Anybody can confirm this problem.
I'm on RAP 1.5 and so far unable to reproduce it on RCP.
Regards,
Setya
On 11/01/2014 02:28 PM, Setya wrote:
> Hi RAP Team,
>
> We have a little case where we put SWT Text component on PageBook which
> reside on a FormDialog. When focus in on the Text and user presses Enter
> key a Widget is disposed exception is thrown.
>
> Below is the snippet:
>
> Button button = toolkit.createButton(container, "PageBook Dialog",
> SWT.PUSH);
>
> button.setLayoutData(GridDataFactory.swtDefaults().hint(150,
> SWT.DEFAULT).create());
>
> button.addSelectionListener
> (
> new SelectionAdapter()
> {
> private static final long serialVersionUID = 8745498441542541616L;
>
> @Override
> public void widgetSelected(SelectionEvent e)
> {
> FormDialog dialog = new FormDialog(container.getShell())
> {
> private static final long serialVersionUID = -8404073274862848632L;
> @Override
> protected void createFormContent(IManagedForm managedForm)
> {
> Composite parent = managedForm.getForm().getBody();
> parent.setLayout(GridLayoutFactory.fillDefaults().create());
>
> FormToolkit toolkit = managedForm.getToolkit();
> Composite composite =
> toolkit.createComposite(parent);
> composite.setLayout(GridLayoutFactory.fillDefaults().create());
> composite.setLayoutData(GridDataFactory.fillDefaults().grab(true,true).create());
>
>
> PageBook pageBook = new PageBook(composite, SWT.NONE);
> pageBook.setLayout(GridLayoutFactory.fillDefaults().create());
> pageBook.setLayoutData(GridDataFactory.fillDefaults().grab(true,false).create());
>
> toolkit.adapt(pageBook, true, true);
> Composite page =
> toolkit.createComposite(pageBook);
> page.setLayout(GridLayoutFactory.fillDefaults().create());
> page.setLayoutData(GridDataFactory.fillDefaults().grab(true,true).create());
>
> Text text =
> toolkit.createText(page, null);
> text.setLayoutData(GridDataFactory.fillDefaults().grab(true,false).create());
>
> pageBook.showPage(page);
> }
> };
>
> dialog.open();
> }
> }
> );
>
> If we remove the PageBook all works fine.
>
> Any help would be greatly appreciated.
>
>
> Regards,
> Setya]]>Setya Nugdjaja2014-11-08T06:08:57-00:00Re: PageBook on FormDialog
https://www.eclipse.org/forums/index.php/mv/msg/842948/1466602/#msg_1466602
this sounds similar to this bug:
449350: Press keys then escape key fast enough in dialog generates
"Widget is disposed" exceptions https://bugs.eclipse.org/bugs/show_bug.cgi?id=449350
which we fixed recently in 3.0 master branch. I can't say for sure what
is going on with RAP 1.5 (a lot of changes have been made to RAP since
than), but could be a similar problem.
Best,
Ivan
Professional services for RAP and RCP? http://eclipsesource.com/services/rap/]]>Ivan Furnadjiev2014-11-09T10:24:58-00:00Re: PageBook on FormDialog
https://www.eclipse.org/forums/index.php/mv/msg/842948/1466775/#msg_1466775
Thank you for your information.
So should I file a bug against this ?
Regards,
Setya]]>Setya Nugdjaja2014-11-09T13:51:49-00:00Re: PageBook on FormDialog
https://www.eclipse.org/forums/index.php/mv/msg/842948/1466874/#msg_1466874
--
Ivan Furnadjiev