|
|
|
Re: Problem with setBlockOnOpen in Dialog [message #120631 is a reply to message #120620] |
Fri, 06 February 2009 07:10 |
Lars Martin Messages: 24 Registered: July 2009 |
Junior Member |
|
|
Hi Igor,
we can confirm the erroneous behaviour. But I'm not sure if this is
dependent on setBlockOnOpen(true). We're using setBlockOnOpen(false) and
get the same exception when we refresh the browser.
Regards, Lars
Igor Pavlenko wrote:
> Hello
>
> Lets create a simple dialog:
>
> public class DemoDialog extends Dialog
> {
> protected DemoDialog(Shell parentShell)
> {
> super(parentShell);
> }
> protected void configureShell(Shell newShell)
> {
> super.configureShell(newShell);
> newShell.setText("Demo dialog");
> }
> protected Control createDialogArea(Composite parent)
> {
> Composite composite = (Composite)super.createDialogArea(parent);
> Label label = new Label(composite, SWT.NONE);
> label.setText("Refresh your browser");
> return composite;
> }
> }
>
> Lets create somewhere two different buttons with two different selection
> listeners:
>
> Button button1 = new Button(parent, SWT.NONE);
> button1.setText("Open dialog");
> button1.addSelectionListener(new SelectionAdapter()
> {
> public void widgetSelected(SelectionEvent e)
> {
> DemoDialog demoDialog = new DemoDialog(parent.getShell());
> demoDialog.open();
> }
> });
> Button button2 = new Button(parent, SWT.NONE);
> button2.setText("Open dialog with ProgressMonitorDialog");
> button2.addSelectionListener(new SelectionAdapter()
> {
> public void widgetSelected(SelectionEvent e)
> {
> final ProgressMonitorDialog progressDialog =
> new ProgressMonitorDialog(parent.getShell());
> try
> {
> progressDialog.run(true, false, new IRunnableWithProgress()
> {
> public void run(final IProgressMonitor monitor)
> throws InvocationTargetException, InterruptedException
> {
> monitor.beginTask(
> "Show dialog task", IProgressMonitor.UNKNOWN);
> final DemoDialog demoDialog =
> new DemoDialog(progressDialog.getShell());
> parent.getDisplay().syncExec(new Runnable()
> {
> public void run()
> {
> demoDialog.open();
> }
> });
> monitor.done();
> }
> });
> }
> catch (InvocationTargetException e1)
> {
> e1.printStackTrace();
> }
> catch (InterruptedException e1)
> {
> e1.printStackTrace();
> }
> }
> });
>
> Use first button to open dialog. Refresh browser. Everithing is fine.
> Use second button to open dialog. Refresh browser.
>
> org.eclipse.swt.SWTException: Failed to execute runnable
> (org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadTer minatedError)
>
> will be thrown.
>
> I can post this bug to bugzilla if it necessary.
>
> Regards,
> Igor
>
|
|
|
Re: Problem with setBlockOnOpen in Dialog [message #120669 is a reply to message #120620] |
Fri, 06 February 2009 08:43 |
Rüdiger Herrmann Messages: 581 Registered: July 2009 |
Senior Member |
|
|
Igor,
what you describe might be a duplicate of
258102: ProgressMonitorDialog causes an Exception on page reload
https://bugs.eclipse.org/bugs/show_bug.cgi?id=258102
Can you confirm this?
Cheers,
Rüdiger
Igor Pavlenko wrote:
> Hello
>
> Lets create a simple dialog:
>
> public class DemoDialog extends Dialog
> {
> protected DemoDialog(Shell parentShell)
> {
> super(parentShell);
> }
> protected void configureShell(Shell newShell)
> {
> super.configureShell(newShell);
> newShell.setText("Demo dialog");
> }
> protected Control createDialogArea(Composite parent)
> {
> Composite composite = (Composite)super.createDialogArea(parent);
> Label label = new Label(composite, SWT.NONE);
> label.setText("Refresh your browser");
> return composite;
> }
> }
>
> Lets create somewhere two different buttons with two different selection
> listeners:
>
> Button button1 = new Button(parent, SWT.NONE);
> button1.setText("Open dialog");
> button1.addSelectionListener(new SelectionAdapter()
> {
> public void widgetSelected(SelectionEvent e)
> {
> DemoDialog demoDialog = new DemoDialog(parent.getShell());
> demoDialog.open();
> }
> });
> Button button2 = new Button(parent, SWT.NONE);
> button2.setText("Open dialog with ProgressMonitorDialog");
> button2.addSelectionListener(new SelectionAdapter()
> {
> public void widgetSelected(SelectionEvent e)
> {
> final ProgressMonitorDialog progressDialog =
> new ProgressMonitorDialog(parent.getShell());
> try
> {
> progressDialog.run(true, false, new IRunnableWithProgress()
> {
> public void run(final IProgressMonitor monitor)
> throws InvocationTargetException, InterruptedException
> {
> monitor.beginTask(
> "Show dialog task", IProgressMonitor.UNKNOWN);
> final DemoDialog demoDialog =
> new DemoDialog(progressDialog.getShell());
> parent.getDisplay().syncExec(new Runnable()
> {
> public void run()
> {
> demoDialog.open();
> }
> });
> monitor.done();
> }
> });
> }
> catch (InvocationTargetException e1)
> {
> e1.printStackTrace();
> }
> catch (InterruptedException e1)
> {
> e1.printStackTrace();
> }
> }
> });
>
> Use first button to open dialog. Refresh browser. Everithing is fine.
> Use second button to open dialog. Refresh browser.
>
> org.eclipse.swt.SWTException: Failed to execute runnable
> (org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadTer minatedError)
>
> will be thrown.
>
> I can post this bug to bugzilla if it necessary.
>
> Regards,
> Igor
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03561 seconds