SVGHMI: avoid Widget's member name colision in between enable expressions and assignments.
--- a/svghmi/widgets_common.ysl2 Wed Nov 23 11:27:55 2022 +0100
+++ b/svghmi/widgets_common.ysl2 Wed Nov 23 11:30:30 2022 +0100
@@ -134,7 +134,7 @@
| "«@id»": new «$widget/@type»Widget ("«@id»",«$freq»,[«$args»],[«$variables»],«$enable_expr»,{
if "$widget/@enable_expr" {
- | assignments: [],
+ | enable_assignments: [],
| compute_enable: function(value, oldval, varnum) {
| let result = false;
| do {
@@ -142,8 +142,8 @@
const "varid","generate-id()";
const "varnum","position()-1";
if "@assign" foreach "$widget/path[@assign]" if "$varid = generate-id()" {
- | if(varnum == «$varnum») this.assignments[«position()-1»] = value;
- | let «@assign» = this.assignments[«position()-1»];
+ | if(varnum == «$varnum») this.enable_assignments[«position()-1»] = value;
+ | let «@assign» = this.enable_assignments[«position()-1»];
| if(«@assign» == undefined) break;
}
}