Re: selectable model discussion
Tupshin Harper <[email protected]> Fri, 02 Jan 2004 14:43:10 -0800
| Newsgroups | gmane.comp.java.xwt.widgets |
|---|---|
| Message-ID | <[email protected]> |
Charles Goodwin wrote: >On Fri, 2004-01-02 at 21:21, Tupshin Harper wrote: > > >>No objections...makes sense to me. I'm assuming that group.selected >>would return null if nothing is selected? >> >> > >Hmm, no, $group.selected would return the most recently (de)selected >group member - it would only be initially null. > >Which would mean that to be sure nothing is selected, you would check >against $group.selection.length which would be 0 in that case. > >Is this intuitive? > >- Charlie > > > After re-reading your original message, I see your point about why that would be the case, but no, it strikes me as counter-intuitive. I bet many people when working with radio button groups, where only one item can be selected, would assume that group.selected would always return the currently selected item, which (almost coincidentally) most of the time, it would. Certainly, a name change for group.selected along the lines of what david suggested would help. If so, I would prefer to have the current selection array be group.selected instead of group.selection. This seems to be a much more intuitive name for describing the current state of the widget. -Tupshin