Friday, February 20, 2015

Re: Is there a way to load GWT code synchronously ???


On Friday, February 20, 2015 at 7:45:12 AM UTC+1, Kisalaya Prasad wrote:
My use case is simple :
Assuming I'm only using GWT as a java-to-javascript compiler, and use it primarily as an exporter (compile java objects to js objects and make  them available to be used in other JS apps).

The asynchronous nature in which the appropriate permutations are loaded means that there is initially a time period in which these objects are not available. I can obviously add a check to see if the objects are loaded and then proceed, but Is there any way around loading code in an async way (assuming I know what browser it will work on) ?

Have you tried collapsing all permutations into one, and using the "single script linker"?

 <collapse-all-properties />
 <add-linker name="sso" />

The alternative is to use a callback that you call from your EntryPoint; this is what JsUpload does: https://github.com/manolo/gwtupload/blob/master/jsupload/src/main/java/jsupload/client/JsUpload.java
and what GWT-Exporter recommends: https://code.google.com/p/gwt-exporter/wiki/GettingStarted

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment