commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hallvard Trætteberg <>
Subject [scxml] support for pnuts as expression language
Date Thu, 17 Aug 2006 15:09:27 GMT

In my PhD thesis I developed a UI dialog modelling language, which uses
statecharts for controlling activation/deactivation of user interface
elements. I'm now in the process of implementing the runtime based on
Apache's SCXML library. It's great to have such a nicely architected package
to work with.

For other parts of the system I use the pnuts scripting language, and
therefore I've implemented support for using pnuts as SCXML's expression
language (instead of EL). BTW, I also use pnuts for scripting within XSWT,
which is used to define the SWT widget hierarchy (the tool is hosted by
Eclipse, hence SWT instead of Swing). It was fairly easy, once I understood
how scoping works! If anyone's interested, I'll be glad to share the code.

The implementation defines a custom Context implementation, and for
debugging purposes I've found it useful to generate a name. Then I thought
that I ideally would like access to the containing state's name (id). Would
it be possible to pass this String as a first argument to
Context.newContext() or somehow make it possible to get hold of it? For
pnuts this gives an extra benefit: I map contexts to pnuts packages, which
are named and may be access using a prefix. Hence, with such names, it would
be possible to refer to other Contexts, making each one look more like a
named object with properties.


Hallvard Trætteberg (,
Associate Professor, IS group, Dept. of Computer and Information Sciences at
the Norwegian Univ. of Science and Technology

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message