HEADS-project / heads_ide

Home Page:http://heads-project.eu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dictionary values used from ThingML code

kehusa opened this issue · comments

Hi,

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

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.

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

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

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.