I don't really have a lot of time today; I can't wade into your code (sorry). My point only is that when you have two groups of functions that need to be maintained you *can* easily have more than one chain. I don't know if that specifically will solve your problem.
On Wed, Feb 23, 2011 at 10:36 AM, deefr <[email protected]> wrote: > Hi Aaron- > > I have previously considered putting (1) > > var foo = new Foo(); > foo.delayedPrint(); > > and (2) > > chain.callChain(); > > into some otherChain together. I then call > > otherChain.callChain(); > > and the delayedPrint() chained function will execute as expected. I > still stumble on how to call otherChain.callChain(); a 2nd time > *after* delayedPrint()'s delay has finished (*without* referencing > either chain from within Foo). Placing otherChain.callChain(); within > (1) above causes (2) to execute immediately after delayedPrint() is > called. > > Can you elaborate on your thought of using otherChain? Is there a > better way to do this? > > Thank you. > > On Feb 23, 1:16 pm, Aaron Newton <[email protected]> wrote: > > Consider having more than one chain. > > > > this.otherChain = new Chain(); > > > > Then push things into the appropriate bucket. > > > > > > > > > > > > > > > > On Wed, Feb 23, 2011 at 9:26 AM, deefr <[email protected]> wrote: > > > Hi Everyone- > > > > > I'm working with Chain. I want to chain multiple functions together, > > > some of which may work with Fx, dealing with multiple animations. When > > > methods from a different class is called which has a delay of it's > > > own, independent of the Chain (as shown in the Fx demos), it's not > > > clear to me how to keep the next .callChain() from executing until the > > > class method currently executing a delay/animation/etc.. has finished. > > > Please see a very simple example of what has me confused below: > > > > >http://jsfiddle.net/deefour/DuXLv/ > > > > > I want the output to console to be > > > > > A > > > B > > > C > > > D > > > > > not > > > > > A > > > B > > > D > > > C > > > > > I am hoping someone can modify my example to properly delay. To > > > describe conceptually what I'm trying to do, it would be the same as > > > me defining all of the Fx transitions in the chaining demo below > > > within independent functions - those functions queued in a Chain - and > > > each function within the chain containing a .callChain() for that same > > > Chain instance - all while maintaining the same animation order > > > instead of each .callChain() call being triggered as soon as each Fx > > > transition has begun. > > > > >http://jsfiddle.net/api/post/mootools/1.3/dependencies/more,art/ > > > > > Looking forward to your reply. >
