That's quite an old version. When you see a link like that, you should 
replace "1.6" with "latest" to jump to the current version, like this:

https://developers.google.com/web-toolkit/doc/latest/DevGuideOrganizingProjects#DevGuideModuleXml

For an external javascript file, you can add the file to the "public" 
directory of a GWT module and write code to insert the <script> tag into 
the DOM. In GWT, we have ScriptInjector [1] to do this, but that's just a 
wrapper - you could do it yourself.

You will need to construct the URL of the javascript file to load. The 
GWT.getModuleBaseForStaticFiles() method [2] is useful for this.

- Brian

[1] 
http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/core/client/ScriptInjector.html
[2] 
http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/core/client/GWT.html#getModuleBaseForStaticFiles()

On Tuesday, October 9, 2012 8:53:13 AM UTC-7, Charlie Youakim wrote:
>
> Boy it's hard to find documentation in GWT out of the basics, but I found 
> this which helps QUITE A BIT!  This needs to be easier to find:
>
>
> https://developers.google.com/web-toolkit/doc/1.6/DevGuideOrganizingProjects#DevGuideModuleXml
>
> On Tuesday, October 9, 2012 11:13:08 AM UTC-4, Charlie Youakim wrote:
>>
>> GWT Lovers,
>>
>> I'm trying to get my feet wet with GWT to see if migrating will work 
>> out.  I usually try the more difficult parts first to make sure I can 
>> finish the project.  The most difficult part of my project(s) is 
>> referencing 3rd party JS libs.  In this example I'm trying to use PubNub as 
>> much of our platform uses it.
>>
>> What I'd like to do is create a reusable object that can be used in other 
>> GWT projects in need of PubNub.  I've got a simple little test running 
>> successfully (ie, I've got the basics of JNSI working), but my question is 
>> -> where do I put the reference to the 3rd party script in order to create 
>> the library/module properly?
>>
>> Right now I just put the reference to the external scripts in the html 
>> page in the project, but I'm pretty sure this is incorrect from a 
>> reusability perspective, as this lib would be used in other projects, each 
>> of which would have their own base html page. 
>>
>> I tried putting the reference in the gwt.xml file, but this seems to lose 
>> the references (ie my test project no longer works as it did when the 
>> scripts were in the html page)
>>
>> Do you have any tips on how to include 3rd party libraries in a reusable 
>> gwt library/widget?
>>
>> Thank you all,
>>
>> Charlie
>>
>

-- 
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/-/UDfZLURrIlIJ.
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.

Reply via email to