Community
Participate
Working Groups
There is a bug with radios. The radio selection events work wrong. The selected event sometimes fires before the unselection event. Comment for developers: Look, for example, at org.eclipse.jface.preference.RadioGroupFieldEditor. Find line 267. You will see, that some selection event listener is added to all of the radios in group. How it should work? The user selects the radio. The old selected radio becomes an unselected (first selection event). The new radio becames selected (second selection event). As you can see in RadioGroupFieldEditor#267 the order of this two events does matter (unselect - the first, select - the second). It is working fine on RCP, But it works wrong on RAP. The problem is in org.eclipse.swt.internal.widgets.WidgetTreeVisitor#accept method. As you can see the WidgetTreeVisitor#accept method will be called for each item in the collection of siblings in that order in wich they was added there. So if you have 4 radios and the last one is selected and you try to select the third (or second or first) one the selected event will process before the unselected event. It is incorrect.
Created attachment 133292 [details] Patch for this issue This patch adds a DeselectionEvent and registers this event in TypedEvent.
Created attachment 133304 [details] Test case
Created attachment 133309 [details] Test case Ensures that the event oder is correct (de-selection events first) for typed and untyped events
Thanks for the patch, Igor. Changes are in CVS HEAD