\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
<$macrocall $name="showSeparatedText" in="A" out="B"/>The original tiddler's separator is: |
The hypothetical separator is:
This works: A | B
I want this to work: A BWithin 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.
{{{ [tag[$:/tags/Macro]search[define showSeparatedText]get[separator]] }}}--
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+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
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/2252a4fe-be76-40b3-8b5a-c746c3569140%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 22 Mar 2019, at 15:54, 'Mark S.' via TiddlyWiki <tiddl...@googlegroups.com> wrote:How does the performance of the "contains" operator compare?
Nessesity is the mother of invention, but sometimes you can avoid a particular nessesity. Perhaps Let them rename the macro but let the macro create a settings tiddler, a system tiddler that stores settings that they do not care about and will not rename. Create the settings tiddler if it does not exist but use its values if it does.
Never the less if a special variable was available to access the title of the tiddler in which the macro resided rather than the current tiddler it would be useful. That would need a tiddlywiki DOM expert to implement.
It would be useful
For your use case
For tiddler s generated from templates that contain macros that inherit the macronames from the tiddler name. (eg new field definition tiddlers creating fieldname macros)
some tricky self referential algorithiums.
Regards
Tony
Change the present ''separator'' here:
<$edit-text field="separator" placeholder="" size="1"/><small> ( Default is `-` )</small><br>
<small>When you delete the present separator, you may have to click again in the box before you can type the new one.</small>macro details
</$set>
\end
I know it needs to be set it in each macro tiddler but it goes someway.
Not withstanding I to would like to be able to access the source as well.
Did you see my practice of field(s) in macro tiddlers of the form macro-macroname with the syntax in the field value? You can then search for tiddler s containing all fields with a prefix of macro- or the field macro-macroname to find the tiddler in which it is defined.
Regards
Tony