| Summary: | 'Widget is disposed'-Exception when using DefaultButtons | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Stefan Hansel <stefan.hansel> | ||||||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | major | ||||||||||
| Priority: | P3 | CC: | Daniel.Ebert | ||||||||
| Version: | 1.3 | ||||||||||
| Target Milestone: | 1.3 RC3 | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 170513 [details]
Stacktrace
Created attachment 170544 [details]
Proposed Fix
The problem is that Shell#getDefaultButton() returns a disposed Button instance. This is not the case in SWT. This patch changes this method to return null if the registered default button has been disposed.
Committed the patch to CVS HEAD. |
Created attachment 170512 [details] Code to reproduce the error We have a problem with RAP 1.3M3 (also still reproducable with RAP1.3RC2). The problem described here doesn't exist in RAP 1.2.1 and currently prevents upgrading to the latest RAP version. We have an UI containing a DefaultButton. Later on this UI (including the Button) gets disposed and replaced by a new UI. TextLCAUtil then runs into a "Widget is disposed"-Exception for that Button. Attached you will find the Stacktrace along with a small sample where you should easily be able to reproduce the problem. The Exception only comes, when the new UI contains a TextField.