On Fri, Apr 16, 2010 at 3:18 PM, t.dave <[email protected]> wrote:
> have you put the code of project B somewhere that project A can see it
> when it is deployed? if you put different projects on the build path
> in eclipse it will compile fine but i don't think that cuts it when it
> comes time to deploy.
>
> i'm doing something similar, where i have one GWT project reusing the
> code of another one in eclipse. what i've done there is to export the
> code from the first project to a jar in the lib directory of the
> second project, and not put the first project on the build path of the
> second. the only pain there is if i change the code of the first
> project i have to re-export to the jar, but that avoids the deploy
> issue you may be running into. and in the gwt.xml of the second
> project you'll have to <inherit> the module of the first project. in
> the first project i have 2 gwt.xml files - one with an entry point and
> one without. in the second project i'm inheriting the one without the
> entry point.
>
> hopefully i'm understanding the problem correctly - just skimmed the
> posts above and quickly throwing in $.02 in hope that it will help.
Dave, EVERYTHING helps. I have actually had some success on this,
thanks to you and Jason, Craigo, and Brian. I've actually succeeded
in getting the pieces to work together. In case it helps anybody
else, I will note a few things I learned along the way.
First, I ended up NOT using the Link Source method, but in playing
with it, I did find out that when you add links to other sources,
Eclipse (Galileo) helpfully puts them into your project navigator
panel (or whatever it's called). Only thing, if you use your
Project->Properties->JavaBuildPath to _remove_ them, they look removed
in the dialog when you do this, but actually they are still there.
So when you're trying to figure out why your project, which you THINK
you have put back to the way it was, isn't working as it was before,
check your project and see if those links are actually gone or not.
Next, what DID work for me (both for development mode and deployment) was:
- add the TestB to JavaBuildPath/Projects
- remove the entry-point class line from the TestB.gwt.xml file
- add to the TestA.gwt.xml file this line:
<inherits name='com.axxessible.testb.TestB'/>
note, in this line it's NOT <inherits
name='com.axxessible.testb.client.TestB'/>
That bit of carelessness cost me some time....
My main class now looks like:
public class TestA implements EntryPoint {
public void onModuleLoad() {
Label label = new Label("hello");
RootPanel.get("nameFieldContainer").add(label);
NewDialog nd = new NewDialog(); <<< this class lives in TestB
nd.show();
}
}
Looking back, it seems so simple now. I think what makes it hard is
that there are so many things you can do wrong. And I tried 'em all.
Thanks to all. I have another question about "Mixing Projects" and
I'll post that later, if anybody is still willing to give out any
hints.
John
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.