Closed Ahmedfcis closed 7 years ago
Header blocks are not supported in the current version of mBlock. It will be ignored by the code generator. only "runArduino" header blocks are considered as the start blocks. Implementing this requires an overhaul of the extension system, which is not included in the current batch of iterations.
Thank you @bigeyex
I creating an extension contains the following “header blocks”
[ "h", "When Remote %d.IRKeys Key Pressed", "procDef", "Power", { "setup":"addPressHandlerIRremote({0},onPress{0});\n", "inc":"", "def":"", "work":"", "loop":"" } ]
I was expecting to have my generated code be as following:
onPressPower() { //... }
void setup(){ addPressHandlerIRremote(POWER,onPressPower); }
but no code was generated, I not sure how 'ArduinoManager.as' handles “header blocks”