Solve import order problem when POULibrary imports ConfigTreeNode because of UserAddressedException. Now UserAddressedException is declared in POULibrary.py, as a quick and dirty fix, but some independant module should be created for beremiz exceptions in general.
// widget_button.ysl2
template "widget[@type='Button']", mode="widget_class"
||
class ButtonWidget extends Widget{
frequency = 5;
init() {
this.element.addEventListener(
"mousedown",
evt => {
change_hmi_value(this.indexes[0], "=1");
});
this.element.addEventListener(
"mouseup",
evt => {
change_hmi_value(this.indexes[0], "=0");
});
}
}
||