ialexei / gwt-charts

Automatically exported from code.google.com/p/gwt-charts
0 stars 0 forks source link

GWT compile #33

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I include gwt-Charts in my maven project(pom.xml) with: 
<dependency>
    <groupId>com.googlecode.gwt-charts</groupId>
    <artifactId>gwt-charts</artifactId>
    <version>0.9.8</version>
</dependency>

I inherit the module with:
<inherits name="com.googlecode.gwt.charts.Charts"/>

I use gwt-2.0.4. When i compile the project i get the next principal erros:

[ERROR] Errors in 
'jar:file:/C:/Users/Fran/.m2/repository/com/googlecode/gwt-charts/gwt-charts/0.9
.9/gwt-charts-0.9.9.jar!/com/googlecode/gwt/charts/client/DataView.java'
         [ERROR] Line 17: The import com.google.gwt.core.client.JsArrayMixed cannot be resolved
         [ERROR] Line 209: JsArrayMixed cannot be resolved to a type

and

  [ERROR] Errors in 'jar:file:/C:/Users/Fran/.m2/repository/com/googlecode/gwt-charts/gwt-charts/0.9.9/gwt-charts-0.9.9.jar!/com/googlecode/gwt/charts/client/format/ColorFormat.java'
         [ERROR] Line 16: The import com.google.gwt.core.client.JsDate cannot be resolved

This errors repeat in other class of gwt-Charts.

¿How to get I solution for this errors?
¿Need I will update gwt-2.0.4 to gwt-2.5.x? (I prefer that don't do this 
option)

Thanks.

Original issue reported on code.google.com by FranS...@gmail.com on 3 Jan 2013 at 1:48

GoogleCodeExporter commented 8 years ago
Both classes (JsDate and JsArrayMixed) were only introduced in GWT 2.1.0
So you really need to upgrade in order to work.
Furthermore, I can only guarantee compatibility with 2.4.0 or higher.

Any particular reason for not upgrading?

Original comment by rglafo...@gmail.com on 3 Jan 2013 at 3:50

GoogleCodeExporter commented 8 years ago
Yes i dont update because if I update the project, this doesnt compile and 
stops working.
Any version of gwt-charts that compile in 2.0.4?

Original comment by FranS...@gmail.com on 10 Jan 2013 at 9:32

GoogleCodeExporter commented 8 years ago
Sorry, but there's no version working with 2.0.4
I can't maintain compatibility since it's almost 3 years old.

You can use the official, that maybe works: 
http://code.google.com/p/gwt-google-apis/wiki/VisualizationGettingStarted

Another alternative is to include those missing classes in your source:
com.google.gwt.core.client.JsArrayMixed
com.google.gwt.core.client.JsDate

Original comment by rglafo...@gmail.com on 10 Jan 2013 at 11:28

GoogleCodeExporter commented 8 years ago
I include
com.google.gwt.core.client.JsArrayMixed
com.google.gwt.core.client.JsDate
and the project compile but when i run, java throws the next exception:

com.google.gwt.core.client.JavaScriptException: (TypeError): 
$wnd.google.visualization is undefined
 fileName: http://127.0.0.1:8888
 lineNumber: 2

The official version "Visualization" dont works :(

Original comment by FranS...@gmail.com on 16 Jan 2013 at 10:45

GoogleCodeExporter commented 8 years ago
You're not loading the api.
Please refer to the docs: 
http://code.google.com/p/gwt-charts/wiki/GettingStarted
You should call the chart loader once, preferably onModuleLoad. 

Original comment by rglafo...@gmail.com on 5 Feb 2013 at 4:12