This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

GWT can't compile SMC generated code

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
statemap.FSMContext is not in the client or shared package? Is it inherited?
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • 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: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • 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: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!