2

I include the d3 javascript like this

<!doctype html>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
     <script src="http://d3js.org/d3.v2.js"></script>
     <script type="text/javascript" src="d3/d3.nocache.js"></script>

  </head>
  <body>
  </body>
</html>

Then when I call it from the entry point d3 is null, why?

package com.example.client;

import com.google.gwt.core.client.EntryPoint;


public class D3 implements EntryPoint {

    public void onModuleLoad() {
        test();
    }
    private native void test()/*-{
        $wnd.alert($wnd.d3); 
     }-*/;

}

1 Answer 1

0

Well, it seems that the problem was that I named the project D3. Need to call it something else because it seems that it overwrites the D3 of the javascript library.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.