svghmi/widget_switch.ysl2
branchsvghmi
changeset 2907 1695122a5e16
parent 2883 8e3d130399b0
child 2962 02ea529fd08c
equal deleted inserted replaced
2906:3b4a1319da09 2907:1695122a5e16
    14     |     },
    14     |     },
    15     |     init: function() {
    15     |     init: function() {
    16     |         // Hello Switch
    16     |         // Hello Switch
    17     |     },
    17     |     },
    18     |     choices: [
    18     |     choices: [
    19     const "regex",!"'^(\"[^\"].*\"|\-?[0-9]+)(#.*)?$'"!;
    19     const "regex",!"'^(\"[^\"].*\"|\-?[0-9]+|false|true)(#.*)?$'"!;
    20     foreach "$hmi_element/*[regexp:test(@inkscape:label,$regex)]" {
    20     foreach "$hmi_element/*[regexp:test(@inkscape:label,$regex)]" {
    21         const "literal", "regexp:match(@inkscape:label,$regex)[2]";
    21         const "literal", "regexp:match(@inkscape:label,$regex)[2]";
    22     |         {
    22     |         {
    23     |             elt:id("«@id»"),
    23     |             elt:id("«@id»"),
    24     |             style:"«@style»",
    24     |             style:"«@style»",