Hi Andrew,

I was wondering if you might know how to use the double bars || to declare 
> in a macro something like... 


If you mean the {{||some-template}} syntax you can sure use that in a 
macro, e.g.

\define some-macro(x,y)
<$list filter="[all[current]has[$x$]]">
{{$x$||some-template}}
</$list>
<$list filter="[all[current]!has[$x$]]">
{{$y$||some-template}}
</$list>
\end

The thing with this is:

I want to set the value of $c$ to the value of $a$ if $s$ is null or empty.


...so long as I have trouble understanding what you're eventually trying to 
achieve,
it is difficult to evaluate whether using a dynamically defined variable 
"$c$" makes sense and how.

You see, I would not use "$s$" as a parameter if it was a field.
Also, how to you mean "set $c$" ...for which context?
Where is $c$ and its value to take effect?
Let me explain...

\define some-macro(some-tiddler,some-field,some-variable,some-value)
<$list filter="[<$some-tiddler$>has[$some-field$]">
<$set name="""$some-variable$""" value="$some-value$""">
what you actually want to do needs to be here, inside the $set, e.g.
{{||some-template}}
</$set>
</$list>
\end

...what in all of the above actually needs to be a paramater and what 
doesn't or why, I would not know.

I would encourage you to follow slightly more specific goals that achieve 
something tangible that you're after. Exploring all that is possible sure 
is a good exercise and fruitful. However, on an as abstract level as this, 
it is hard to imagine anything, to decipher what you're going for, because 
the why and what is a wee blurry... unless you're that kind of artist that 
just swings that brush and sees what comes out of it all later. :D

Best wishes,

— tb

-- 
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/6892505d-72fe-44f9-ab3d-cba39f04c9c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to