views:

160

answers:

1

Looking over Hecl, the scripting language with a J2ME runtime, I wonder about its capabilities:

Assuming my base Midlet has methods and variables that I've written

  1. Can the Hecl interpreter run within my Midlet, and side-by-side with my classes?
  2. Can the Hecl script call any of my methods within the Midlet?
  3. Can the Hecl script utilize and modify any of my variables?

Thanks in advance.

+1  A: 

Jeremy - at this point you'd be better off emailing me or (even better) writing to the Hecl mailing list, rather than relying on my RSS feed to notify me of SO articles related to Hecl!

  1. Yes, Hecl can run as an 'embedded' interpreter. For instance, you could write an entire app in Java and only use the interpreter for callbacks in response to events.

  2. Since J2ME doesn't have Reflection, you have to write the glue between your methods and what's available to the interpreter. It's pretty easy, though: PutsCmd.java

  3. To modify variables, once again, you'd have to provide some glue. It's not that hard though. There are ways to map back and forth between Hecl values and Java values.

In any case, I watch SO from time to time, but the mailing list or email would probably be a better place for more detailed questions.

David N. Welton
David, I've created a tag for hecl, you can visit that page every now and then to keep in touch with updates -- see http://stackoverflow.com/questions/tagged/hecl
Jenko
Cool, thanks! Still though, for more in-depth stuff, the mailing list (soon to be a Google Group) is the place to be.
David N. Welton