Opened 14 years ago

Closed 14 years ago

#4581 closed defect (invalid)

2nd callback does not receive parameters on dojo.deferred

Reported by: guest Owned by: Dustin Machi
Priority: high Milestone: 1.0
Component: Core Version: 0.9
Keywords: Cc:
Blocked By: Blocking:



        var obj1 = {
            f:function(param) {
                console.debug("obj1.f received:"+param);
        var obj2 = {
            f:function(param) {
                console.debug("obj2.f received:"+param);
        var deferred = new dojo.Deferred();
        deferred.addCallback(obj1, obj1.f);
        deferred.addCallback(obj2, obj1.f);


obj1.f received:bla
obj1.f received:undefined

It should return

obj1.f received:bla
obj1.f received:bla

Change History (3)

comment:1 Changed 14 years ago by dylan

Owner: changed from anonymous to Dustin Machi

comment:2 Changed 14 years ago by guest

This was on nightly build 27.09.2007

comment:3 Changed 14 years ago by Dustin Machi

Resolution: invalid
Status: newclosed

Deferred callbacks are chained to one another (the the output of the first item in the chain gets passed as the input to the second item in the chain). Therefore this behavior is correct. In order to make it do what you are trying to do, you would need to have obj1's f() have a return param; in it.

Note: See TracTickets for help on using tickets.