I think this is a good idea. I needed something similar too, so I ended up writing an ugly hack that worked most of the time...
d.addBoth(function (res) {d.addBoth(finalFunc); return res; }); It adds new callback once the first deferred result drops in, hopefully after all the other callbacks have been added... But a more formally correct solution would probably be a good idea. Cheers, /Per On Tue, Feb 10, 2009 at 2:30 PM, Amit Mendapara <mendapara.a...@gmail.com> wrote: > Hi Per, > > I have just started again improving the MochiKit Extensions. While > creating tests for the Ajax module, I found one problem (not bug, but > specific to the feature I'm trying to implement). I registered a > callback which should be fired at the end of all registered callbacks. > > I achieved by modifying Async.js with a new method `setFinal` (not > addFinal as there should be only one finalizer) which gets fired when > `chain.length == 0`. It's simple. I would we happy if you add one such > function in MochiKit.Async.Defered... > > Regards > -- > Amit > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to mochikit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~----------~----~----~----~------~----~------~--~---