| Summary: | CTabFolder should throw IllegalArgumentException when a disposed control is set as its top right control | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Remy Suen <remy.suen> |
| Component: | SWT | Assignee: | Carolyn MacLeod <carolynmacleod4> |
| Status: | RESOLVED FIXED | QA Contact: | Bogdan Gheorghe <gheorghe> |
| Severity: | normal | ||
| Priority: | P3 | CC: | carolynmacleod4, Silenio_Quarti |
| Version: | 3.7 | ||
| Target Milestone: | 4.3 M1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
The setDefaultButton(Button) method from Decorations will throw an IllegalArgumentException when a disposed button is set, why doesn't CTabFolder's setTopRight(Control) method do the same? Display display = new Display(); Shell shell = new Shell(display, SWT.SHELL_TRIM); shell.setLayout(new FillLayout()); CTabFolder folder = new CTabFolder(shell, SWT.CLOSE); Composite c = new Composite(folder, SWT.NONE); c.dispose(); folder.setTopRight(c); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose();