Login Register

chain

Syntax for Chaining functions with dojo.deferred

Hi. Have been working on this for a few hours and feel like I'm very very close to getting this syntax right. But something is slightly off. In dojo, how do you chain functions together so that one function is called after another is complete, such as:

myFunction1().myFunction2();

this is what i've got:

dojo.declare(
"testAsync",
null,
{
//properties
myStore: null,
myStoreRequest: null,
jsonURL: '',
count: 5,
start: 0,
name: null,
bust_cache: true,
myDeferred: null,

Chain Animation onEnd Event Firing

Hi All,

I have noticed the following behaviour when using the dojo.fx.chain animation and connecting to its onEnd event.

What I would like to do is have a couple of animations run one after the other, then when all have finished, call another function, below is my contrived example;

var anim1 = dojo.fx.wipeOut({node:'ele'});
var anim2 = dojo.fx.wipeIn({node:'ele'});
var c = dojo.fx.chain([anim1,anim2]);

dojo.connect(c,"onEnd",someFunc);

c.play();
Syndicate content