Hi Joseph, I think what you suggest may be the solution. I could transplant the code from onModuleLoad() to a method that's invoked from one of the scripts loaded by Requirejs.
It's slightly awkward because onModuleLoad() is an instance method, so I need to expose the EntryPoint object in a way that makes it accessible for native scripts. This means that there would still be a race between the native scripts and the GWT application - if the native script executes before the EntryPoint has initialised, there won't be an instance available to call the JSNI method on. But I expect this could be handled by window timeouts until everything is ready. Clearly this needs more work. If I finc a working solution, I'll post it here. Chris On Tuesday, 14 August 2012 15:18:26 UTC+1, Joseph Lust wrote: > > Chris, > > But I still have problems when JSNI code calls into a Javascript library >> before it's finished loading. The solution would appear to be to use >> require.js to load the nocache script that boots the application, so that >> it won't start executing until all its dependencies have loaded. > > > Have you considered adding some JSNI methods published to the DOM so that > your require.js code can call into your GWT code and start processes as > needed, once it has loaded the needed resources? > > > Sincerely, > Joseph > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/OPPzjUtXPmEJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
