Runtime Problems

0 views
Skip to first unread message

daveh

unread,
May 19, 2006, 11:05:09 AM5/19/06
to Google Web Toolkit
At runtime, do classes in the client package have restricted access to
classes outside the package?

I have com.dave.client.TestApp that uses a class in com.dave - it
compiles OK but as soon as I try to run it I get somethign like ....
Line 6: The import com.dave.DavesAsyncCallBack cannot be resolved

Is this expected behaviour?

I'm running it from within Eclipse 3.2

Dave

Burning Iez

unread,
May 19, 2006, 11:17:22 AM5/19/06
to Google Web Toolkit
well, try moving DavesAsyncCallBack class in the client package.

daveh

unread,
May 19, 2006, 11:37:52 AM5/19/06
to Google Web Toolkit
It looks like anything that you want to use in the client app needs to
be declared within the client package. I'm trying to use some existing
value objects from an existing application whcih are in a different
package. Looks like that is not possible.

Scott Blum

unread,
May 20, 2006, 11:59:19 PM5/20/06
to Google Web Toolkit
If you need to access source that's not in your normal client package,
you need to add a "source" entry to your module. Example:

com/foo/Foo.gwt.xml (your main app)
com/foo/client (your client source)
com/foo/other (more source you'd like to use)

add <source path="client"/><source path="other"/> to Foo.gwt.xml to
pull in both packages. If your other package is in an unrelated
package heirarchy you will need to create a new module over there for
the sole purpose of "sourcing" that package; then have your main module
inherit the new one. Did that make sense?

For reference:
http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.Fundamentals.Modules.ModuleXml.html

Scott Blum
GWT Engineer

Simp

unread,
May 21, 2006, 8:33:52 AM5/21/06
to Google Web Toolkit
Thanks a bunch.
Finally I'm able to do the packaging for my custom components.

daveh

unread,
May 21, 2006, 3:33:47 PM5/21/06
to Google Web Toolkit
Thanks Scott - I thought I was going to have to write a load of value
objects just to get data from my existing classes in to my gwt
application

Dave

dab...@gmail.com

unread,
May 23, 2006, 2:10:30 AM5/23/06
to Google Web Toolkit
I tried this - ie creating a module for my persistence pojos. It
appears that the compiler can see my inherited module's gwt.xml file
but not the class files. Still I get the message:

"The import org.xxx.domain cannot be resolved".

Any ideas where to look next?

--Daniel

Reply all
Reply to author
Forward
0 new messages