yes, but javascript is single threaded. At issue is that your events that you are attaching - the effects - are themselves asynchronous. They contain timeouts. But your class that you're attaching these events to have no knowledge of this delay. So the problem is that you need to attach these events to the completed chain of the effects. The contract for Events and for Chain both say that they accept functions that they call and that's all they know about. They don't know if those functions call ajax or effects or wait for the user to do something.
What you're trying to do is break that contract, where an event you attach has some say in when the class to which you are attaching the event calls the next event. It's convoluted and basically a bad idea. Whatever you are really trying to do (in your real work, not this demo), there's probably a better way. On Fri, Jan 15, 2010 at 10:14 AM, batman42ca <[email protected]> wrote: > Both events still fire at nearly the same time: > > http://mootools.net/shell/M28PW/ >
