Opened 11 years ago

Closed 11 years ago

#5899 closed defect (fixed)

[cla][patch][unit test]dojo DeferredList return broken (plus fix for typo)

Reported by: tvachon Owned by: Dustin Machi
Priority: high Milestone: 1.1
Component: General Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description

Currently, the following code:

var d1 = new dojo.Deferred();

var d2 = new dojo.Deferred();
var dl = new dojo.DeferredList([d1, d2]);
dl.addCallback(function(res){
    console.log(res);                
});
d1.callback("foo");
d2.callback("bar");

prints a list like [undefined, [true, "foo"], [true, "bar]] to the console, when it should be printing true, "foo"], [true, "bar"?

Attached patch fixes this and adds some basic regression tests.

Attachments (1)

dojoDeferredList.patch (3.8 KB) - added by tvachon 11 years ago.
Patch to fix problem + tests. (Updates to remove variable and not fix typo, since it's already been fixed in changeset 12508)

Download all attachments as: .zip

Change History (5)

comment:1 Changed 11 years ago by Adam Peller

Milestone: 1.1
Owner: changed from anonymous to Dustin Machi
Priority: normalhigh
Summary: dojo DeferredList return broken (plus fix for typo)[patch][cla?][unit test]dojo DeferredList return broken (plus fix for typo)

Changed 11 years ago by tvachon

Attachment: dojoDeferredList.patch added

Patch to fix problem + tests. (Updates to remove variable and not fix typo, since it's already been fixed in changeset 12508)

comment:2 Changed 11 years ago by tvachon

Summary: [patch][cla?][unit test]dojo DeferredList return broken (plus fix for typo)[patch][unit test]dojo DeferredList return broken (plus fix for typo)

CLA submitted 2/19/2008.

comment:3 Changed 11 years ago by dylan

Summary: [patch][unit test]dojo DeferredList return broken (plus fix for typo)[cla][patch][unit test]dojo DeferredList return broken (plus fix for typo)

comment:4 Changed 11 years ago by Dustin Machi

Resolution: fixed
Status: newclosed

(In [12994]) fix deferredList. fixes #5899 and adds test file. thanks tvachon

Note: See TracTickets for help on using tickets.