Within a tiddler that contains a global macro, I want to be able to
reference a *field* within the tiddler where the macro is defined.
If I share the tiddler with the macro and that person renames the tiddler,
the reference breaks. I want to stop this happening.
So I thought of having something like a hypothetical *tv-macro-origin*
Variable, so that I can safely reference the tiddler & field the macro is
in.
Example - I have a tiddler with fields:
title: *showSeparatedText Macro*
tags: *$:/tags/Macro*
separator: *|*
\define showSeparatedText(in out)
The original tiddler's separator is: {{showSeparatedText Macro!!separator}}
<br>
The hypothetical separator is: {{$(tv-macro-origin)$!!separator}}
<br>
This works: $in$ {{showSeparatedText Macro!!separator}} $out$
<br>
I want this to work: $in$ {{$(tv-macro-origin)$!!separator}} $out$
\end
In another tiddler I put this code:
<$macrocall $name="showSeparatedText" in="A" out="B"/>
The result:
The original tiddler's separator is: |
The hypothetical separator is:
This works: A | B
I want this to work: A B
I was hoping the recent discussion under : Test for existence of macro
<https://groups.google.com/forum/?hl=en#!topic/tiddlywiki/4rEuAWc4EpM> :
could have helped, but it doesn't appear to.
Any pointers on how this can be achieved would be appreciated.
Thanks!
--
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/715006a6-8031-4d2d-82a8-1b771e80aa4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.