I try to pass a parameter as arguments parameter to a TouchWrapper/SendEvent but it seems impossible.
Please find attached my latest try (with bind, I also tried without bind)
{ "type": "APL", "version": "1.0", "theme": "dark", "import": [], "resources": [], "styles": {}, "layouts": { "Button": { "parameters": [{ "name": "arguments", "type": "array" }, { "name": "backgroundColor", "type": "color", "default": "#fff" }, { "name": "borderColor", "type": "color", "default": "#000" }, { "name": "text", "type": "string" }], "item": { "type": "TouchWrapper", "bind": [{ "name": "args", "value": "${arguments}" }], "onPress": { "type": "SendEvent", "arguments": ["${args}"] }, "item": { "type": "Frame", "borderWidth": 1, "borderRadius": 5, "borderColor": "${borderColor}", "backgroundColor": "${backgroundColor}", "item": { "type": "Container", "paddingTop": "4dp", "paddingRight": "4dp", "paddingBottom": "4dp", "paddingLeft": "4dp", "alignItems": "center", "justifyContent": "center", "items": [ { "type": "Text", "text": "${text}" } ] } } } } }, "mainTemplate": { "items": [{ "type": "Button", "arguments": ["bar"], "text": "Foo" }] } }
I also tried passing the args parameter in different ways:
"arguments": "${args}" -> "arguments": []
"arguments": ["${args}"] -> "arguments": ['["bar"]']
legend: input -> output in request