HEADS-project / heads_ide

http://heads-project.eu
9 stars 2 forks source link

Dictionary values used from ThingML code #67

Closed kehusa closed 9 years ago

kehusa commented 9 years ago

Hi,

In my ThingML component I need to define and get access to a dictionary value from the kevScript. Can this be accomplished?

brice-morin commented 9 years ago

Not sure I understood exactly (an example would help), but it should be fairly easy to expose the ThingML properties as Kevoree dictionary attributes, and make sure the update method in Kevoree actually updates the ThingML attributes. I suggest that you, as the platform expert, try to modify the ThingML to KevoreeJS compiler. I'll of course provide assistance. This way we can have feedback on the new compilation framework and this compiler in particular.

brice-morin commented 9 years ago

Not that in Java, we had that feature at some point. Maybe it has disappeared after some refactoring. But we do not have it in JS, indeed

brice-morin commented 9 years ago

I'm working on it. Should be ready sometimes today

brice-morin commented 9 years ago

OK, the feature should be implemented, but currently not released yet in the plugins.

Note that it allows to set ThingML attributes from Kevoree/KevScript. However, if a ThingML internal component updates its attributes, the corresponding attributes in the Kevoree wrapper component will not be updated. It could be problematic if you hack some manually written code in your generated Kevoree component, for example. I'll try to make the attribute mapping bi-directional later on.