Source.js
A framework control requires JavaScript code. The JavaScript code is defined in the Source.js file at project level, which is included in each framework control project. The Source.js file defines the base framework for the implementation of a framework control and can be flexibly extended.
Programming conventions:
The programming conventions provide a basis for standardizing framework controls. They are used to distinguish between internal and external access.
- Member variables are marked with the prefix"__" and in Camel case:
this.__myVar = …;
- Functions with external access (Engineering: setter/getter functions) are identified without prefix and in Camel case:
MyControl.prototype.setMyVar = …
- Internal functions are marked with the prefix "__" and in Camel case:
MyControl.prototpye.__processMyVar = …
If you make changes in the Source.js file and the framework control is already associated with an HMI project, you must then carry out a project build of the framework control to apply the changes. |