PDA

View Full Version : Cant compile any of the samples



carpii
18 Oct 2008, 1:41 AM
Hi,

Im trying to compile some of the samples, but Im really struggling.
Heres where Ive ended up...

1) Taken Basic Grid example from website, and saved as GridExample.java.

2) Followed the screencasts on how to set up GXT

3) Used GWT's projectCreator to create a basic eclipse project.
I then added GridExample to my project and instantiated a GridExample widget, and added it to the demo panel

4) Added <inherits name='com.extjs.gxt.ui.GXT'/> to my project XML

Trying to compile this, it complains about some resource classes which are missing (Stock.java for example).

After a chat on IRC, I linked "com/extjs/gxt/samples/resources" into my project source path (maybe I did this wrong, but I dont think so, since it compiles)

Now the project compiles, but GWT's hosted browser bombs out with the errors...

[ERROR] Errors in 'file:/home/carpii/dev/gwt/Gridtest/src/com/google/gwt/gridtest/client/GridExample.java'
[ERROR] Line 32: No source code is available for type com.extjs.gxt.samples.resources.client.model.Stock; did you forget to inherit a required module?
[ERROR] Line 84: No source code is available for type com.extjs.gxt.samples.resources.client.TestData; did you forget to inherit a required module?

Heres a screenie just to show how Ive added the source paths. Im new to Eclispe so maybe I made a mistake there

Thanks for any help. Im dying to use the grid control in my project


http://img185.imageshack.us/img185/5928/snapshot2di3.jpg

carpii
18 Oct 2008, 2:05 AM
Finally, I got it working

It seems that at some point in Eclipse, I removed the resource source folders frommy project, and readded them.

What I didnt realise is that Eclipse seems to have emptied some of the directories, so Stock.java didnt exist anymore

After unzipping the gwt1.1.zip again, into the library directory, it compiles and also runs

carpii
18 Oct 2008, 2:07 AM
Id like to see a screencast on compiling one of the demos (even though I got it working, I found it incredibly difficult, especially when youre not familiar with Eclipse).

Its a bit strange that the samples need so much work just to compile, and if I wasnt so desperate to use the Grid I would have just abandoned using ExtGWT

Not that this is a complaint, its just a bit of constructive criticism to improve the demos :)

zebulon303
4 Nov 2008, 12:10 AM
I am struggling with the exact same problem, but can't resolve it the way carpii did it.

I guess there is only one client package tree authorize per GWT project ... ???? I have put all code in a client subpackage and now it is working ...

Error: http://img530.imageshack.us/my.php?i...stitre1mm1.png (http://img530.imageshack.us/my.php?image=sanstitre1mm1.png)

resolved : http://img49.imageshack.us/my.php?im...stitre1fm6.png (http://img49.imageshack.us/my.php?image=sanstitre1fm6.png)

Is that correct ? only one client main package authorized ?

gslender
4 Nov 2008, 3:01 AM
I guess there is only one client package tree authorize per GWT project ... ???? I have put all code in a client subpackage and now it is working ...

Is that correct ? only one client main package authorized ?

Yes and No. By default, GWT will include the .client package, but you can include others if you wish in the gwt.xml


<source path="questionaire"/>
<source path="client"/>