John McKeon wrote:<div><br></div><div><<<</div><div><div>Hey Andy</div><div>I have a radio group defined like this (using your code):</div><div><br></div><div>renderContentOn:html</div><div>| group |</div><div>html form:</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>[</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>html radioGroup [ :rg |</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>rg radioButton</div>
<div> submitOnClick;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>selected: self contact isMale;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>callback: [self halt];</div>
<div> with: [html text:'male'].</div><div> rg radioButton...etc</div><div>]</div><div>Hope that helps</div><div>John</div></div><div>>>></div><div><br></div><div>Thanks John, </div>
<div>That does fix part of the problem. Initially the radio buttons weren't actually in concert - the code in the Seaside book wasn't producing 'name="something"' code. I wonder whether that code would ever work?</div>
<div><br></div><div>Anyway, unfortunately, the callbacks are still not working. It is very odd. The form renders properly, it is just that the callbacks never fire. The code below shows two version - radio button and select statement. The select version works perfectly. I would be really interested to know how to go about debugging this.</div>
<div><br></div><div><div>renderContentOn:html</div><div><br></div><div>html form:</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>[</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>html radioGroup: [ :rg |</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>rg radioButton</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>selected: self contact isMale;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>callback: [self contact beMale];</div>
<div> with: [html text:'male'].</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>rg radioButton</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>selected: self contact isFemale;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>callback: [self contact beFemale];</div><div> with: [html text:'female'].</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>].</div>
<div>html select</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>list: #(#Male #Female);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>selected: self contact gender;</div><div>
<span class="Apple-tab-span" style="white-space:pre">        </span>callback: [:value| (value=#Male) ifTrue:[self contact beMale] ifFalse:[self contact beFemale]].</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>html submitButton on: #save of:self.</div>
<div>]</div></div><div><br></div><div>Cheers</div><div>Andy</div><div><br></div>