lifeinafolder/Promises — Issue #1: Can you provide an example of how to use this?
Author: Integralist
Created: 2012-01-25 17:35:58+00:00
State: open

I've tried running the following code (see also: http://jsfiddle.net/AFF2w/)...

```js
function doSomethingAsynchronously() {
var dfd = new Deferred();

window.setTimeout(function() {
dfd.resolve('my resolved data');
}, 10000);

return dfd.promise();
}

Promise.when(doSomethingAsynchronously()).then(function(result) {
console.log(result);
});
```

...but it fails with the error: `Uncaught TypeError: Object 0 has no method 'bind'`

Not sure if your code was supposed to be in a 'working' condition at this stage or not?