On Mon, Nov 22, 2010 at 08:26, Joffrey Fuhrer - NOVLOG <
[email protected]> wrote:
> Hello there, qooxdoo-list!
>
> I'm wondering about a possibility to do something in qooxdoo
> without too much effort and trust that some of you may have
> some ideas about it, so here's my questioning :
> Is there any facility in qooxdoo that allows to listen to multiple
> events at once, and perform a given action once they've all been fired?
>
> I'll probably soon find myself in the following case: Submitting an
> undefined number of requests (1 to n, really, even though I could
> know this number at runtime) and I want to wait for them all to
> respond before performing a final, given action.
>
> There may be multiple solutions to that problem but I don't want
> to reinvent anything that's already been done, so I'm mainly
> asking if it already exists in the SDK.
>
There's nothing specific to this case built in, and you're right, there are
many possible solutions. The easiest may be to submit your requests via a
common function that increments a counter with each request. Your event
handler(s) can then decrement the count upon receipt of the response, and
perform the final action when the count goes to zero.
Does that do what you're looking for?
Derrell
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel