- How do I use Slime with my Code? Using the latest Pharo image, and have found the Slime classes, but not sure how to use them.<div><br></div><div>- Tried this :-</div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>html span class: 'formdata'; with: [html </div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>textInput</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>id: #tournamentname;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>value: tournamentEvent tournamentName;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>callback: [:value | tournamentEvent tournamentName: value];</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>onChange: (html jQuery ajax serializeThis; html: [:r | r render: [self test: 1 on: r]] )].</div>
<div><br></div><div>but cannot see any changes to the DOM element.</div><div><br></div><div>Thanks for looking at this for me.</div><div><br></div><br><div class="gmail_quote">On Tue, Feb 10, 2009 at 3:18 PM, Lukas Renggli <span dir="ltr"><<a href="mailto:renggli@gmail.com">renggli@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="Ih2E3d">> html span class: 'formdata'; with: [html<br>
> textInput<br>
> id: #tournamentname;<br>
> value: tournamentEvent tournamentName;<br>
> callback: [:value | tournamentEvent tournamentName: value. self test: value<br>
> on: html];<br>
> onChange: (html jQuery ajax serializeThis)].<br>
<br>
</div>html is not valid in the context of a callback. When the callback is<br>
evaluated the response connected to the html canvas you are referring<br>
to has already been sent to the client. Slime would detect such<br>
mistakes.<br>
<div class="Ih2E3d"><br>
> #potsize is the id: of another field in the dialog. My callback works, but<br>
> the DOM is not updated. What is the correct way to update other DOM elements<br>
> in this fashion?<br>
<br>
</div>Try something along:<br>
<br>
onChange: (html jQuery ajax<br>
serializeThis;<br>
html: [ :r |<br>
" gee, we have a new renderer "<br>
r render: DateAndTime now ])<br>
<br>
Lukas<br>
<font color="#888888"><br>
--<br>
Lukas Renggli<br>
<a href="http://www.lukas-renggli.ch" target="_blank">http://www.lukas-renggli.ch</a><br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>-JT<br><br><br>
</div>