Actions in Button Widget and Action Macro: Call Macro Directly or Put Macro Call in Triple Double Quotes
- open https://tiddlywiki.com
- create a tiddler with below text
\define my-action(param)
<$list filter="[<par01>addprefix[my literal string ]addprefix<__param__>]">
<$action-setfield $tiddler=test01 $field=text $value=<<currentTiddler>> />
</$list>
\end
<$let par01="Hello Tiddlywiki" par02>
<$button actions=<<my-action "my passed attribute">> > Do it</$button>
</$let>
{{test01}}
The above code does not work. On click, test01
is updated with wrong text value. The param
passed seems to be ignored.
Now change the $button as below
<$button actions="""<<my-action "my passed attribute">>""" > Do it</$button>
Now this modified code works as expected (note to triple quotes). What is wrong here?