Hi,
What is the best practice for inheriting resources?
We've been separating resources from code, much like this:-
Module A
--------
org.test.modulea.client.widgets
->class MyWidget extends Composite {
private MyResources resources = GWT.create( MyResources.class );
public static interface MyResources extends ClientBundle {
@Source("../resources/images/anImage.png")
ImageResource anImage();
}
} etc
org.test.modulea.client.resources.images
-> anImage.png
Module B
--------
<inherits name="org.test.modulea.ModuleA"/>
However we are finding we need to duplicate the client.resources
package in ModuleB as well.
>From what I have read and understand I believe this is caused by the
relative "source" URI being prefixed with ModuleB's name and hence
they are being looked for in org.test.moduleb.client.resources.images.
Looking at Google's examples images appear to always be in the same
package as the code needing them with no use of "@Source". This I
suspect removes the URI issue.
I'd love to hear what is thought as best practice and how to avoid the
re-use problem we have.
Thanks for reading,
Mike
--
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.