On 22/11/2010 14:31, Derrell Lipman wrote:
On Mon, Nov 22, 2010 at 08:26, Joffrey Fuhrer - NOVLOG
<[email protected] <mailto:[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
Hi Derrell,
In appearance it would, but I'm always cautious with these first
impressions.
There are always a ton of implementation details you never think of at first
and that become growing problems further down the line!
But I'll see when I get there, I've had other problems to solve prior to
that.
Thanks for the quick answer and tip anyway!
Cheers,
--
Joffrey Fuhrer
NOVLOG Intern
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel