svghmi/widget_assign.ysl2
changeset 3922 ffc8da83fdc2
parent 3627 1b627c2c743c
equal deleted inserted replaced
3921:9bb17341aebb 3922:ffc8da83fdc2
    69     const "paths","path";
    69     const "paths","path";
    70     foreach "arg[contains(@value,'=')]"{
    70     foreach "arg[contains(@value,'=')]"{
    71         const "name","substring-before(@value,'=')";
    71         const "name","substring-before(@value,'=')";
    72         const "value","substring-after(@value,'=')";
    72         const "value","substring-after(@value,'=')";
    73         const "index" foreach "$paths" if "@assign = $name" value "position()-1";
    73         const "index" foreach "$paths" if "@assign = $name" value "position()-1";
    74         const "isVarName", "regexp:test($value,'^[a-zA-Z_][a-zA-Z0-9_]+$')";
    74         const "isVarName", "regexp:test($value,'^[a-zA-Z_][a-zA-Z0-9_]*$')";
    75         choose {
    75         choose {
    76             when "$isVarName"{
    76             when "$isVarName"{
    77     |         const «$value» = this.assignments["«$value»"];
    77     |         const «$value» = this.assignments["«$value»"];
    78     |         if(«$value» != undefined)
    78     |         if(«$value» != undefined)
    79     |             this.apply_hmi_value(«$index», «$value»);
    79     |             this.apply_hmi_value(«$index», «$value»);