<div>Hello Joachim.<br></div><div><br></div><div>I agree completly with all you say, just some remarks:</div><div>* ?: is conditional *operator* and not conditional *statement* (sorry for this remark, but for clarification purpose it is important).</div>
<div>* you change to the JSIfThenElse class fix the problem to have conditional statement with a false part, but with this change there is no longer conditional operator (which is really useful to use in expressions). I think it would be better to add the factory methods missing to JSObject (like #conditional:else: and #conditional:elseif:), and the respective decorations classes if nedded.</div>
<div><br></div><div>Regards.</div><br><div class="gmail_quote">2013/4/10 <a href="mailto:jtuchel@objektfabrik.de">jtuchel@objektfabrik.de</a> <span dir="ltr">&lt;<a href="mailto:jtuchel@objektfabrik.de" target="_blank">jtuchel@objektfabrik.de</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Gaston,<br>
<br>
Am 10.04.13 17:11, schrieb Gastón Dall&#39; Oglio:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello all.<br>
<br>
I guess that Seaside developers only wrap js construction that was needed to give support to another pieces of Seaside (like ajax, jQuery...), and they are not thinking in to give really support to construct complex js code in with Smalltalk objects. For that reason those js wrappers are incomplete and no correctly correlated to js language.<br>

</blockquote></div>
Well, they are indeed incomplete, but cover quite some area. But I agree that sometimes the API to construct javascript statements feels strange. That is why I sometimes prefer to write a jQueryPlugin and integrate it with a subclass of JQPlugin on the Smalltalk side. Works quite well so far.<div class="im">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
For example, for conditional statements exists only JSCondition that to evaluate only for true case, neither &quot;If...else&quot; nor &quot;If...else if...else&quot; (JSIfThenElse wrap the conditional operator not conditional statement).<br>

</blockquote></div>
Hmm. I wasn&#39;t aware of the differences between an if/then/else statement and the conditional statement. For me that was just the same thing with a shorter (and idiotic, but C-like) syntax. So the fix I suggest(ed) turns a JSIfThenElse form a conditional statement into an If..then...else statement. Not sure where there might be problems. Maybe if somebody uses JsIfThenElse on the right side of an assignment in JS. For my purposes, it does a good job.<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
Recently I made an Seaside app and often I had to make js sentences using &quot;JSStream on:&quot;, no good :(. I&#39;ve also seen other programmers code which did the same, in Reef IIRC. Maybe to use amber for that to be better...<br>

<br>
Below some inline comments:<br>
<br></div>
2013/4/10 <a href="mailto:jtuchel@objektfabrik.de" target="_blank">jtuchel@objektfabrik.de</a> &lt;mailto:<a href="mailto:jtuchel@objektfabrik.de" target="_blank">jtuchel@objektfabrik.de</a>&gt; &lt;<a href="mailto:jtuchel@objektfabrik.de" target="_blank">jtuchel@objektfabrik.de</a> &lt;mailto:<a href="mailto:jtuchel@objektfabrik.de" target="_blank">jtuchel@objektfabrik.de</a>&gt;&gt;<div class="im">
<br>
<br>
<br>
     There&#39;s always something new to learn in Seaside and its<br>
    Javascript integration.<br>
<br>
<br>
Yes it&#39;s really true!<br>
<br>
    Please remember my fix if you need to have more than one<br>
    javascript statement executed (concatednated with a , on the<br>
    Smalltalk side) in either the true or false branch.<br>
<br>
    But maybe the fix isn&#39;t needed if you put those into a JavaScript<br>
    block. I never tried and never had the idea before until right now<br>
    as I type this.<br>
    I don&#39;t even know if<br>
<br>
    (a==b) ? {callA(); callB()} : {callC(); callD()};<br>
<br>
<br>
In conditional operator, you have to use &quot;,&quot; instead to &quot;;&quot; to separate sentences within brackets. Seaside to use an &quot;;&quot; to render js when concatenate sentences, so you have a problem here :(<br>

</div></blockquote>
So my fix is perfect. Because it completely eliminates the conditional statement and nobody has to worry about that (once again, very technical) difference.<br>
<br>
Or am I missing something?<br>
<br>
Joachim<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">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>