<div dir="ltr">Johan:<div><br></div><div>I don&#39;t have expertise in Seaside versioning, so I can&#39;t imagine how a minor change would impact third party systems.</div><div>Having said that I find your proposal appropiate.</div>

<div><br></div><div>One thing that doesn&#39;t translate properly is the &quot;always&quot; callback.<br></div><div><br></div><div>#onComplete: -&gt; always -&gt; #ensure:/#always: ?</div><div>#onSuccess -&gt; done -&gt; onDone:</div>

<div>#onError -&gt; fail -&gt; onFail:</div><div><br></div><div>I would do:</div><div><br></div><div>JQAjaxSetup&gt;&gt;onError: aJSObject</div><div><br></div><div>self greaseDeprecatedApi: &#39;...&#39; details: &#39;...&#39;.</div>

<div>self onFail: aJSObject</div><div><br></div><div><br></div><div>Another, more complex, path is to model the JS Promise (JSPromise?), which can be useful for future uses and libraries (<a href="http://promisesaplus.com/">http://promisesaplus.com/</a>).</div>

<div><br></div><div><br></div><div>Regards!</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div>

Esteban A. Maringolo</div>
<br><br><div class="gmail_quote">2014-07-28 17:09 GMT-03:00 Johan Brichau <span dir="ltr">&lt;<a href="mailto:johan@inceptive.be" target="_blank">johan@inceptive.be</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Reading through the documentation, it seems we could easily make this jQuery deprecation transparant for Seaside users:<br>
<br>
- onComplete option -&gt; always callback<br>
- onSuccess option -&gt; done callback<br>
- onError option -&gt; fail callback<br>
<br>
Since the return value of the existing methods on JQAjaxSetup was self already (i.e. the JQAjaxSetup subinstance), making this a transparant change is possible by converting it to add a corresponding function call decoration on the jQAjaxSetup instance, which returns self as well and allows to chain the messages in exactly the same way as they were done before.<br>


<br>
So the implementation of onComplete would be<br>
<br>
JQAjaxSetup&gt;&gt;onComplete: aJSObject<br>
        self call: &#39;always&#39; with: ajSObject asFunction<br>
<br>
Although this is a good thing for continuity, it&#39;s probably a bad idea to keep the old method names and rather make everyone use onFail:, onDone: and onAlways: instead (not sure about the last one though...).<br>
<br>
Thoughts?<br>
<span class="HOEnZb"><font color="#888888"><br>
Johan<br>
</font></span><div class="im HOEnZb"><br>
On 18 Jul 2014, at 17:46, Esteban A. Maringolo &lt;<a href="mailto:emaringolo@gmail.com">emaringolo@gmail.com</a>&gt; wrote:<br>
<br>
</div><div class="HOEnZb"><div class="h5">&gt; I was needing to handle an &quot;error&quot; callback for an xhr post, and found<br>
&gt; there is no #onError: handler in JQPost. Went to jQuery website I<br>
&gt; noticed most of the success/fail/complete methods in JQAjax hierarchy<br>
&gt; are deprecated.<br>
&gt;<br>
&gt; Deprecation Notice<br>
&gt; The jqXHR.success(), jqXHR.error(), and jqXHR.complete() callback<br>
&gt; methods introduced in jQuery 1.5 aredeprecated as of jQuery 1.8. To<br>
&gt; prepare your code for their eventual removal, use jqXHR.done(),<br>
&gt; jqXHR.fail(), and jqXHR.always() instead.<br>
&gt;<br>
&gt; Is anybody updating JQuery wrapper for that? Or is there already a way<br>
&gt; to deal with the new &quot;promise&quot; style way of chaining callbacks?.<br>
&gt;<br>
&gt; What I&#39;m doing now is something like:<br>
&gt; ((html jQuery post callback: [] value: ()) call: &#39;done&#39; with: (&quot;js<br>
&gt; function&quot;)) call: &#39;fail&#39; with: (&quot;fail function&quot;)<br>
&gt;<br>
&gt; Regards!<br>
&gt;<br>
&gt;<br>
&gt; Esteban A. Maringolo<br>
</div></div><div class="HOEnZb"><div class="h5">&gt; _______________________________________________<br>
&gt; seaside-dev mailing list<br>
&gt; <a href="mailto:seaside-dev@lists.squeakfoundation.org">seaside-dev@lists.squeakfoundation.org</a><br>
&gt; <a href="http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev</a><br>
<br>
_______________________________________________<br>
seaside-dev mailing list<br>
<a href="mailto:seaside-dev@lists.squeakfoundation.org">seaside-dev@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev</a><br>
</div></div></blockquote></div><br></div>