<br><br><div class="gmail_quote">On Thu, Aug 6, 2009 at 4:16 AM, Philippe Marschall <span dir="ltr">&lt;<a href="mailto:philippe.marschall@gmail.com">philippe.marschall@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2009/8/5 Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Hi! I am trying to understand how seaside handle double or more, request. I<br>
&gt; started with the simpler example: WACounter, which has:<br>
&gt;<br>
&gt; renderContentOn: html<br>
&gt;     Transcript show: &#39;renderContentOn&#39;; cr.<br>
&gt;     html heading: count.<br>
&gt;     html anchor<br>
&gt;         callback: [ self increase ];<br>
&gt;         with: &#39;++&#39;.<br>
&gt;     html space.<br>
&gt;     html anchor<br>
&gt;         callback: [ self decrease ];<br>
&gt;         with: &#39;--&#39;<br>
&gt;<br>
&gt;<br>
&gt; increase<br>
&gt;     Transcript show: &#39;increase&#39;; cr.<br>
&gt;     count := count + 1.<br>
&gt;     (Delay forSeconds: 3) wait.<br>
&gt;<br>
&gt;<br>
&gt; Now, suppose the counter is in 0. I click one time on &#39;++&#39; and wait and I<br>
&gt; see in the transcipt:<br>
&gt;<br>
&gt; increase<br>
&gt; renderContentOn<br>
&gt;<br>
&gt; Ok, perfect. New session, 0 again. Now I click on &#39;++&#39; but before it finish,<br>
&gt; I click 3 times more (very quickly). I can see this in the transcipt:<br>
&gt;<br>
&gt; increase<br>
&gt; increase<br>
&gt; increase<br>
&gt; increase<br>
&gt; renderContentOn<br>
&gt;<br>
&gt; So, as I can see:<br>
&gt;<br>
&gt; 1) the callback (self increase in this case) is called for every click.<br>
&gt; 2) the renderContentOn isn&#39;t call until all of the self increase of that<br>
&gt; session finish.<br>
&gt; 3) when renderContentOn  is called, the webpage shows the number 1 (which is<br>
&gt; correct instead of 4).<br>
&gt;<br>
&gt; Now the questions are:<br>
&gt;<br>
&gt; a) how does seaside can do that? every request has its own variables? I<br>
&gt; think this has to be with continuations but I want to be sure.<br>
<br>
</div></div>I order of you observations:<br>
1) You (your browser) makes three callback requests and discards the<br>
redirect to render for the first two</blockquote><div><br>Ok, but which is the &quot;condition&quot; to be discarded? if the callback request is finished but there are others callbacks request then it is discarded? <br> </div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
2) There is a lock that allows only one request per session at a time,<br>
otherwise your components would have to be thread safe<br>
3) state backtracking, before every request the state of the counter<br>
is reverted to 0</blockquote><div><br>that&#39;s because there was the method states ? <br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<div class="im"><br>
&gt; b) which of all of the self increase is the one that is finally rendered?<br>
&gt; the first one?<br>
<br>
</div>That should be the last one. The browser should discard processing the<br>
previous requests. Disable backtracking to be sure.</blockquote><div><br>what do you mean with Disable backtracking ? remove the method states from the component? <br><br>Thanks!<br><br>mariano<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Cheers<br>
<font color="#888888">Philippe<br>
</font><div><div></div><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br>