Toura/mulberry — Issue #211: Provide "magic" resolution of promises in components
Author: rmurphey
Created: 2011-12-15 22:08:25+00:00
State: open

It's very common for a component to need to update itself once some async operation concludes. To deal with this now, we end up writing code like:

```
this.node.somePromise.then(dojo.hitch(this, '_dealWithIt'));
```

We should add a property to components that would handle this automatically:

```
when : {
'somePromise' : '_dealWithIt'
}
```

To do this, we'd add something like the following to `postCreate`:

```
dojo.forIn(this.when, function(promise, resolver) {
promise.then(dojo.hitch(this, resolver));
}, this);
```