[Seaside] Re: callbacks on radio buttons not executed
Julian Fitzell
julian at beta4.com
Wed Jul 21 09:02:40 CEST 2004
Kamil Kukura wrote:
> Julian Fitzell wrote:
>
>> Are you using it in conjunction with #radioGroup?
>>
>> You need to do, for example:
>>
>> MyComponent>>renderContentOn: html
>> group := html radioGroup.
>>
>> html radioButtonInGroup: group withValue: 1 on: #foo of: self.
>> html radioButtonInGroup: group withValue: 2 on: #foo of: self.
>> html radioButtonInGroup: group withValue: 3 on: #foo of: self.
>
>
> Thanks for explanation. Now I got it to work though I had to correct
> this method little bit: I don't have such method as Symbol>>asMutator so
> I replaced it with
>
> ....
> callback:
> [anObject perform: (aSelector copyWith: $:) asSymbol with: value]
>
> as I saw in some other method of rendering engine.
I assume you're using VW or something? Michel can probably make sure
this gets added in the port or something.
Also note that you don't have to use the ...on:of: version of the
method. There is also #radioButtonInGroup:selected:callback: which
takes a group, a boolean, and a callback block. So, for example:
MyComponent>>renderContentOn: html
group := html radioGroup.
html
radioButtonInGroup: group
selected: (self foo = 1)
callback: [:v | self foo: 1].
html
radioButtonInGroup: group
selected: (self foo = 2)
callback: [:v | self performSomeActionOrOther].
Cheers,
Julian
More information about the Seaside
mailing list