[tw5] Re: How do I pass a variable to a Javascript macro? (or don't I?)

2020-05-23 Thread Joshua Fontany
In order to pass a value "by reference" to a macro call (while not inside a macro definition), you need to expand it out to the full <$macrocall> widget: ``` <$set name=bgcol value="7"> >> <$macrocall $name=nowandthen m=11 v=<> />"<>" ``` https://tiddlywiki.com/#MacroCallWidget Best,

[tw5] Re: How do I pass a variable to a Javascript macro? (or don't I?)

2020-05-22 Thread leeand00
Okay, so the $()$ syntax can only be used within a macro...gotcha; Thanks! On Friday, 22 May 2020 19:31:07 UTC-4, Mark S. wrote: > > The substitution forms (e.g. $variable$, $(external variable)$ only work > INSIDE a macro. So you have to > put > > >>< > >"$(bgcol)$" > > inside its own macro

[tw5] Re: How do I pass a variable to a Javascript macro? (or don't I?)

2020-05-22 Thread 'Mark S.' via TiddlyWiki
The substitution forms (e.g. $variable$, $(external variable)$ only work INSIDE a macro. So you have to put >>< >"$(bgcol)$" inside its own macro like: \define misnamedmacro() >>< >"$(bgcol)$" \end and call it: <$set name=bgcol value="7"> <> Of course, there could be other things