Dear all,
I'm having some trouble (again!) with macro parameters. What I would like
to do is to create a macro that displays a button that opens several
tiddlers at once, defined by a filter. It works as expected when the filter
is defined in the macro, so
\define openTiddlersTest()
<$button>
<$list filter="Test1 Test2">
<$action-navigate $to={{!!title}}/>
</$list>
Open tiddlers
</$button>
\end
opens the tiddlers "Test1" and "Test2" as expected. However, when the
filter is parameterized as follows:
\define openTiddlers(tf)
<$button>
<$list filter=$tf$>
<$action-navigate $to={{!!title}}/>
</$list>
Open tiddlers
</$button>
\end
<<openTiddlers "Test1 Test2">>
only "Test1" is opened. Variations such as <<openTiddlers "[[Test1]]
[[Test2]]">> and <<openTiddlers """Test1 Test2""">> don't work either.
I tried to add parentheses around the parameter:
\define openTiddlers(tf)
<$button>
<$list filter=$(tf)$>
<$action-navigate $to={{!!title}}/>
</$list>
Open tiddlers
</$button>
\end
which strangely enough opens the tiddler "true". (Why would "$(tf)$"
evaluate to "true"?) Even worse, when I try to use instead angle brackets:
\define openTiddlers(tf)
<$button>
<$list filter=<<tf>> >
<$action-navigate $to={{!!title}}/>
</$list>
Open tiddlers
</$button>
\end
seemingly every single tiddler in the Wiki is opened, and eventually it
crashes completely.
Could anyone give me a hint as to what I'm doing wrong? I would also
greatly appreciate an explanation of what is going on here, since I
evidently don't grasp the WikiText semantics yet.
Best regards,
Linus
--
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/28276197-2738-4e21-9300-f658364993ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.