On Tuesday, November 24, 2015 at 12:09:02 AM UTC-8, Jed Carty wrote:
To make it work you can use something like this:
\define helperOne()
{{testState!!value}}
\end
\define button(variable)
<$button set="!!order" setTo=<<calc !!order +1 until:$variable$ >> >add</$button>
\end
\define callButton()
<$macrocall $name='button' variable=$(ThisThing)$/>
\end
<$set name=ThisThing value=<<helperOne>>>
<<callButton>> <$view field="order"/>
</$set>
This could be simplified a lot:
* although <<macro ...>> parameters are not wikified, <$macrocall ....> parameters *are*, so you can use {{...}} directly.
* after defining a variable via <$set>, you can use <<variablename>> as a widget parameter value, even when you are *not* in a macro
Thus, no need for helperOne(), callButton(), or ThisThing...
\define button(variable)
<$button set="!!order" setTo=<<calc !!order +1 until:$variable$ >> >add<
/$button>
\end
<$macrocall $name='button' variable={{testState!!value}}/><$view field="order"/>
enjoy,
-e