Thanks for your quick responses!
The inherits wasn't the problem here... instead I forgot something
more fundamental: that I had to include the Kiyaa! .java files in the
classpath. To help things along I've created a massive jar file that
includes all the latest kiyaa code -- both .class and .java files.
Now I appear to have run into a more substantial roadblock: there
appears to be an API issue in a key class. I'm using GWT 1.5.3 which
I suspect may be the problem; perhaps Kiyaa! is compiled with 1.6.x?
In DictionaryConstantsGenerator.java you have:
String serializerClassName = baseType.getQualifiedSourceName()
+"_TypeSerializer";
TypeSerializerCreator typeSerializerCreator = new TypeSerializerCreator
(tempLogger, serializableTypeOracle, context, serializerClassName);
That doesn't compile for me; instead it wants a JClassType as the
final parameter for the constructor. I've tried:
String serializerClassName = baseType.getQualifiedSourceName()
+"_TypeSerializer";
JClassType type = getType(serializerClassName);
TypeSerializerCreator typeSerializerCreator = new TypeSerializerCreator
(tempLogger, serializableTypeOracle, context, type);
...but when I run the compiler I now get:
[java] Scanning for additional dependencies: file:/D:/project/src/
com/example/gui/client/FooModule.java
[java] Computing all possible rebind results for
'com.example.gui.client.FooStartupValues'
[java] Rebinding com.example.gui.client.FooStartupValues
[java] Invoking <generate-with
class='com.habitsoft.kiyaa.rebind.DictionaryConstantsGenerator'/>
[java] [ERROR] Failed to generate
com.example.gui.client.FooStartupValues
[java] com.google.gwt.core.ext.typeinfo.NotFoundException:
com.example.gui.client.FooStartupValues_TypeSerializer
[java] at com.google.gwt.core.ext.typeinfo.TypeOracle.getType
(TypeOracle.java:433)
[java] at com.habitsoft.kiyaa.rebind.BaseGenerator
$GeneratorInstance.getType(BaseGenerator.java:341)
[java] at
com.habitsoft.kiyaa.rebind.DictionaryConstantsGenerator
$DictionaryConstantsGeneratorInstance.generateClassBody
(DictionaryConstantsGenerator.java:128)
...and so on.
My FooStartupValues extends DictionaryConstants, has a @Dictionary
annotation, and defines several method signatures.
Any thoughts?
On May 21, 5:22 pm, Dobes Vandermeer <
dob...@gmail.com> wrote:
> Oh, forgot to mention, make sure that your GWT module inherits the Kiyaa
> module with the functionality you need. You can read about this in the GWT
> docs, too, but it looks something like this in your *.gwt.xml file:
> <!-- Inherit the kiyaa toolkit -->
> <inherits name='com.habitsoft.kiyaa.Kiyaa'/>
>
>
>
>
>
> On Thu, May 21, 2009 at 5:21 PM, Dobes Vandermeer <
dob...@gmail.com> wrote:
> > Hi there,
> > The usage is very much like the Constants and Dictionary classes provided
> > by GWT.
>
> > Define methods in the DictionaryConstants subinterface, one for each value
> > you want to embed on the page.
>
> > To save values on the page you create your own concrete subclass on the
> > server, for example:
>
> > MyValues mv = new MyValues() {
> > String whatever() { return "whatever"; }
> > Date pageServeTime() { return new Date(); }
> > };
>
> > And use the write to insert that into the page.
>
> > To load values from the page, use GWT.create(), like
>
> > MyValues mv = GWT.create(MyValues.class);
>
> > GWT.log(mv.whatever(), null); // access the members like this
> > GWT.log(mv.pageServeTime(), null); // Any serialization object can be used
>
> > I hope that helps, let me know if you have more questions.
>