I'm trying to work with a third-party javascript library to add charts to my app (using highcharts). I've created some JSNI methods to wrap the highcharts calls and added the js script includes to the application HTML file. The actual .js files are located in the war directory.
When I add the panel that hosts the chart to the root panel directly and then call the function to create the chart - all in the onModuleLoad entry point - everything works fine. However, when I try to do this using UIBinder, I get an error. In this case, I'm calling the chart-creating function in the constructor of the UIBinder backing class after the initWidget call. The error I receive indicates that an object is null that I believe comes from the highcharts library. Based on this, and the fact that it works fine from within the entry point method, I would guess that the highcharts library is not being loaded in the UIBinder case - therefore resulting in the null object reference. Should I be including the script files via the module xml file instead of directly in the HTML file? I'm not quite sure how to do that - I couldn't find any info in the 2.x docs. Any suggestions? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. 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.
