list of dots Digital Research Alliance of Canada logo  NSERC logo  University of Ottawa logo / UniversitĂ© d'Ottawa

User Manual    [Previous]   [Next]   

E9220 JavaScript Unsupported

JavaScript generation does not support a feature the class uses yet

The JavaScript generator covers the basic class model. When a class uses a feature it does not cover yet, it reports this error, which names the feature, and writes no file for the class. The other classes of the model are still generated, and generation for other languages is not affected. The JavaScript page lists the features concerned.

The error is also reported for a class whose superclass is not generated, since the generated module loads its superclass with require, and for a class whose methods would not all have names of their own, since JavaScript has no overloading and would keep only the last method of a name. The JavaScript page gives the cases.

To generate JavaScript, leave the feature out of the classes you generate as JavaScript, or put it in a mixset that is only used for the other languages.

Example

// A state machine is not generated for JavaScript yet, so generating
// JavaScript from this model reports E9220 and writes no Lamp.js
generate JavaScript;
class Lamp {
  status {
    On { turnOff -> Off; }
    Off { turnOn -> On; }
  }
}

      

Load the above code into classic UmpleOnline
Load the above code into UmpleOnline V2

 

Solution to The Above So the Message No Longer Appears

// Without the state machine the class is generated
generate JavaScript;
class Lamp {
  Boolean on = false;
}

      

Load the above code into classic UmpleOnline
Load the above code into UmpleOnline V2