Re: No Source code is available for type client.Utilityt, did you forget to inherit a required module?
I ran into this sort of a problem today. I followed the steps from TONS of articles, tutorials, guides, and posts. But none worked!
None of the other guides covered the possibility of only including a sub-dir of your module as translatable code, so I didn't find an example of how this path should be formatted. But I should have realized that it was a path and not a package name, duh!
On Monday, February 7, 2011 12:09:33 PM UTC-5, Hilco Wijbenga wrote:
On 5 February 2011 21:14, Dallas007 <nandi...@gmail.com> wrote:
> Hi,
> i am new to GWT so need help please. I'm am not able to compile my
> code due to below error.
>
> Here are my project details,
> I have added a new class Utility.java which is out side of Client
> package. I have instantiae the Utiltity object inside cliant code and
> imported the class. So I am not sure how to fix this could you please
> advise me on this?. How to use my Utility class in side client code?See http://www.gwtapps.com/doc/
html/com.google.gwt.doc. ,DeveloperGuide.Fundamentals. Modules.ModuleXml.html
specifically the <source> tag.I would suggest you create a separate module for your utility code.
The generated JAR should contain:org/example/utils/Code.java
org/example/utils/Code.class
org/example/Utilities.gwt.xmlWhere Utilities.gwt.xml has
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module
PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0.1//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.0.1/ "distro-source/core/src/gwt- module.dtd
>
<module rename-to="Utilities">
<inherits name="com.google.gwt.core.Core"/>
<source path="utils"/>
</module>Then you can use <inherits name="org.example.Utilities"/> to use your
utility code in other modules.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home