Closed wighawag closed 10 years ago
The short answer is that whenAll should work here, if it's not that's my problem. Once that is working you'll get the error handling, etc. for free.
I'm confused with:
Promise.when(assetPromises)...
The compiler should be erroring there, telling you that you can't pass an array of promises, only one or more promises as arguments (variadic).
Are you on the latest promhx? It looks like you're using some older signatures. E.g., Promise.error was replaced by Promise.catchError. (and Promise.errorThen lets you recover from errors gracefully). The latest version might fix your Promise.whenAll problems.
Sorry I was using Promise.whenAll(assetPromises)
to get the error I mentioned.
When using `Promise.when(assetPromises)I get
Array<promhx.Promise
I am using promhx 0.2.9 and I can only see "error" and no "catchError" . when you say latest version I suppose you are talking about the one on github? I will try this.
Thanks
I just tried with the version from git and it works without problem, thanks
Hi,
I am getting back into haxe and I' d like to use promhx.
After getting hand on some old code that were working with some version of promhx (I think), it does not seem to work anymore.
The following code fails on the Promise.when. I tried using Promise.whenAll but it also fails saying among other errors :
Note : AssetLoader return a Promise of type T
any ideas?