[Seaside-dev] Re: [Seaside Commits] Seaside 3.0: Seaside-Tests-Functional-obi.101.mcz

Julian Fitzell jfitzell at gmail.com
Thu Dec 31 19:48:41 UTC 2009


On Thu, Dec 31, 2009 at 9:40 AM, Paolo Bonzini <bonzini at gnu.org> wrote:
> On 12/31/2009 05:31 PM, Gerhard Obermann wrote:
>>
>> Well I could use value: if i use something like:
>>
>> value: anObject
>>
>>    group isNil
>>          ifTrue: [ super value: anObject]
>>          ifFalse: [group hasCallback
>>                          ifTrue: [ self value: (group callbackValue:
>> anObject) ]
>
>                                      ^^^^
>
> you mean super here
>
>>                          ifFalse: [ super value: anObject] ]
>
> which gives
>
> (group notNil and: [ group hasCallback ])
>    ifTrue: [ super value: (group callbackValue: anObject) ]
>    ifFalse: [ super value: anObject ]
>
> It doesn't seem too bad at all.

Yeah, I don't think that bothers me.

I think I'd still like to see the "selected" value passed into the
RadioGroup though (with #selected: presumably) so that you don't have
to add the conditional check on every button:

    self
        renderLabel: 'Radiogroup'
        input: [
            html radioGroup
                callback: [:value | radio := value];
                selected: radio;
                with: [ :group |
                    self elements do: [ :each |
                        html label: [
                            group radioButton value: each.
                            html text: each ].
                        html break ] ] ]
        output: radio printString
        on: html

I guess RadioButton>>value: would need to check whether the group has
a selection and, if so, compare it to the passed in object?

Julian


More information about the seaside-dev mailing list