Macro parameters are not wikified before being passed to the macro. So you
end up with:
<<calc !!order +1 until:{{testState!!value}} >>
with the string {{testState!!value}} passed to the macro, not the number it
represents. I have some explanation of what is gong on here
<http://inmysocks.tiddlyspot.com/#Concatenating%20Strings%20-%20What%20Breaks>,
it is the same problem but in a different context. The solution is the same
though.
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>
Using set widgets and macros like this can come up a lot if you make things
with complex transclusions.
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/2188731b-3dca-4bb1-a858-c8bf88f40083%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.