HEADS-project / training

Training material to get started with the HEADS technologies
10 stars 16 forks source link

TestTimerJS is hardcoded as TypeDefinition in Javascript Kevoree Compiler #71

Closed kehusa closed 9 years ago

kehusa commented 9 years ago

Whatever I write call my Configuration in ThingML, the TypeDefinition in Kevoree gets to TestTimerJS: Is there some hardcoding or have I configured something wrong?

configuration FieldNode { instance timer : SensorTimerJS instance sensor : SensorJS instance server : SensorServer connector sensor.timer => timer.timer
connector server.sensor_service => sensor.sensor_service
}

/**

brice-morin commented 9 years ago

It is hard-coded indeed, but can easily be fixed. I basically started (with Maxime) writting an example of what we want to generate before "templatizing" this code into a compiler. Obviously, I forgot to put a parameter when generating the toString:

builder.append("/**\n* Kevoree component\n* @type {" + cfg.getName() + "}\n*/\n");
builder.append("var " + cfg.getName() + " = AbstractComponent.extend({\n");
builder.append("toString: 'TestTimerJS',\n");//this is hardcoded by mistake. Should be builder.append("toString: '" + cfg.getName() + "',\n");
brice-morin commented 9 years ago

Should be fixed now. You can update your HEADS IDE in 15 minutes or so.