The timeout is not a promise nor does it act like a promise because a
promise is something that your sum() method would actually return to the
caller so that the caller can react to the promise outcome by registering
callbacks to it. In your example your sum() method returns nothing and you
schedule a function that returns a value that nobody will ever receive.
If you would make your sum() method return a real promise then you have to
either write the Promise in GWT as well using JsInterop or use elemental2
library and cast it into the promise of elemental2. Then you can wait for
the promise to resolve to get the result.
You received this message because you are subscribed to the Google Groups "GWT
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.