Community
Participate
Working Groups
The SelectionDialog interface is inconsistent. The public API is array based but the protected API is List based. This is really hard to program. NOTES: RG (4/9/01 11:41:38 AM) The fields result and initialSelections should be of type object[] (along with the return type of their accessors) This will be a breaking api change but the class was only made public in build 042. EG (4/10/01 3:04:31 PM) it was public before (around 33). We are now duplicating the Workbench version of the SelectionDialog and this should not be required. RG (4/16/01 5:39:10 PM) Awaiting approval to release API change jeem (5/4/01 6:37:03 PM) There is a minor inconsistency in the API in one method: protected void setResult(List newResult). It really should have been protected void setResult(Object[] newResult). SelectionDialog is allowed to have arbitrary subclasses which may call this method; a change of method signature would be a breaking change for these clients. Since this inconsistency is an annoyance rather than a hinderance, making this change would likely do more harm than good. RG (5/7/01 9:16:10 AM) The other inconsistent method is protected List getInitialSelections()getInitialSelections() It returns a list even though the API to set the initial selections takes an array public void setInitialSelections(Object[] selectedElements) Although selection dialog will have subclasses that will be affected it only became officially public in build 042 (it had the @private tag previously) so the number of people using it may be limited at this point.
PRODUCT VERSION: 0.042
There are no plans to change the current API.
Reopened for investigation
The public interface is consistent - it takes and returns arrays of Objects. Making the internal representation a List was done for effeciencies sake. There are 30 references in 2.0 to the List implementation so changing this now is of very little value and a lot of pain.