Sending progress up the chain.


  • I am deeply nesting promises and need to send some progress that occurs up the chain.  Let's assume this:

    function longRunningAsync() {
      return new WinJS.Promise(function (c, e, p) {
        // eventually
        p('progress happened');
    function doWork() {
      var promises = files.map(function(file) {
        return longRunningAsync()
      return WinJS.Promise.join(promises);
    function doAllWork() {
          function onComplete() {
          function onError() {
          function onProgress() {
    I would expect the progress that occurs at the top to float all the way to the bottom but it does not. How do I achieve this sort of thing?

    Monday, July 09, 2012 11:37 PM


All replies