• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

GWT can't compile SMC generated code

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used SMC (State Machine Compiler) to generate Java code I wanted to use in GWT. The code looks trivial, and I can compile it with javac with no problem.
However GWT produces errors like:

[java] [ERROR] Line 11: statemap cannot be resolved to a type
[java] [ERROR] Line 39: _transition cannot be resolved
[java] [ERROR] Line 41: _transition cannot be resolved
[java] [ERROR] Line 46: statemap cannot be resolved to a type
[java] [ERROR] Line 48: _state cannot be resolved

What can be the problem?

Here is the source code: (I could not attach a file)


 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

GWT accepts only those java classes for the client side, which it can convert to JS. Looks like your smc package cannot.
 
Jerry Storm
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I understand this, I want to know what causes the problem so that I can maybe address it.
 
Rancher
Posts: 436
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
statemap.FSMContext is not in the client or shared package? Is it inherited?
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jerry Storm wrote:I understand this, I want to know what causes the problem so that I can maybe address it.


This can only work if
1) Is the source code for the smc package available to GWT to 'compile' to JS?
2) Ensure the smc package uses only 'white listed' classes.
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hauke Ingmar Schmidt wrote:statemap.FSMContext is not in the client or shared package? Is it inherited?


I think then Jerry would have got the "Did you inherit the ...." error message.
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Found and added the white listed classes.
http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic