>
> Sure, something like that is theoretically possible (if Button.Group
> implemented Sequence, and we defined a ButtonGroupItem class that
> served as a means to dereference button IDs). But do you really think
> that is more readable than this?
>
> >   <RadioButton wtkx:id="oneButton" buttonData="One" selected="true"
> > buttonGroup="numbersGroup"/>
> >   <RadioButton wtkx:id="twoButton"
> > buttonData="Two"buttonGroup="numbersGroup"/>
> >   <RadioButton wtkx:id="threeButton"
> > buttonData="Three"buttonGroup="numbersGroup"/>
>
> I don't.
>

Yes the current syntax is more readable but to be honest while evaluating the 
tutorial to decide whether I want to use Pivot, the line:

        final Button.Group numbersGroup = 
Button.getNamedGroups().get("numbers");

Set off alarm bells. It is far too cumbersome and does not follow what I would 
have intuitively guessed as the structure given what I have learned about 
Pivot.

>
> Did you try declaring your group in a <wtkx:define> block and setting
> it on the radio buttons like this?
>
> <wtkx:define>
>       <Button.Group wtkx:id="numbersGroup"/>
> </wtkx:define>
>
> <RadioButton wtkx:id="oneButton" buttonData="One" selected="true"
> buttonGroup="$numbersGroup"/>
>
> Then you can bind to it if you want.

This is much better.

Reply via email to