Hi c pa, when you call a macro inside a widget (to return a parameter) it is not wikified, it only does string substitution of the parameter in to the content of the macro - this has led me to waste a lot of time as it is not what you would expect. I would write some javascript macro for this.
cheers BJ On Tuesday, June 30, 2015 at 5:59:14 PM UTC+1, c pa wrote: > > I am unable to pass a value to a macro when that value has been generated > by <$count>. > > A demo of the problem: > http://cpashow.tiddlyspot.com/#What_s_wrong_with_this > > Here's the code: > \define getCountOfItemsInList(tiddlerName, fieldName) > <$count filter="[list[$tiddlerName$!!$fieldName$]]" /> > \end > \define generateSelectWithNumberOptions(xnum) > <br/>''executing generateSelectWithNumberOptions(xnum="$xnum$")'' > <$select> > <$list filter="1 2 3 4 $xnum$"> > <option value=<<currentTiddler>> > > <<currentTiddler>> > </option> > </$list> > </$select> > \end > Can I generate a number using a macro that calls <$count>? > <<getCountOfItemsInList "What_s_wrong_with_this" "test">> > (Yes)<br/> > Can I generate a select containing a list of options by passing a > number? > <$macrocall $name="generateSelectWithNumberOptions" > xnum=6 > /> > (Yes)<br/> > Can I generate a select containing a list of options by passing a > value from a macro that calls <$count>? > <$macrocall $name="generateSelectWithNumberOptions" > xnum=<<getCountOfItemsInList "What_s_wrong_with_this" > "test">> > /> > (No)<br/> > > -- 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 tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. 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/b1d14f0e-bc42-41d4-bb33-2c1681339b18%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.