Further to my last post; When setting a variable using $set or $vars you may also be using a macro to set a value, eg <$vars when=<<now DD-MMM-YYYY>> >
Once again this macro can only be used as a parameter if we; - Use substitutions in its definition - OR be defined using javascript, as the NOW macro is. Please confirm this as well. Regards Tony On Thursday, April 30, 2020 at 10:11:05 AM UTC+10, TonyM wrote: > > Eric, > > Genius. For the first time you have explicitly stated why I have > experienced repeated "fragility" when designing solutions in TiddlyWiki. > > Please confirm or correct my interpretation below; > > Macros are text-substitution processors. As such, they only do two things: >> >> 1) replace parameters -- $paramname$ -- with the values passed to the >> macro >> 2) replace variables -- $(variablename)$ -- with the values currently >> assigned by the calling context >> >> After completing those replacements, the result is then inserted into the >> calling context which determines how the macro result is handled. >> > > ... > With this example > >> \define journalTiddlerName( ) <<now DD-MMM-YYYY>> $(project)$ >> > > 1) <$transclude tiddler=<<journalTiddlerName>> mode="block" /> >> 2) <<journalTiddlerName>> >> 3) <$tiddler tiddler=<<journalTiddlerName>>> >> > > > *I think an easy to make error, is that <<journalTiddlerName>> renders as > expected in wikitext (2nd example above), but if it contains "anything" > other than substitutions (macros or widgets) it will not work as a > parameter (as used in 1 & 3).* > > *Can we also say?* > > - If it must be used as a parameter, it should first be wikified? > - Wikification with the wikify widget needs to be done on a whole > macro, you can't rely on the wikify widget inside a macro definition, > because this will not work in a parameter because of the wikify widget > itself. > - This means that the wikify widget is of limited use inside macros > which you may wish to use as a parameter. > > Please confirm or clarify this an I will publish this lesson in my own > words for the larger community. > > Thanks in advance > Tony > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/b62751b2-527c-43d2-8c5f-70e5c04ca9e9%40googlegroups.com.

