Hi Henry Oh, I thought you could write a macro in a tiddler and then transclude that > tiddler when you wanted to use the macro. Like a .h in C++. >
Think of the TW display as a tree; transcluding a tiddler grafts the content of that tiddler onto the tree, but it doesn't affect the the parents or siblings. > Second question (or do you want me to make another post?): > Can we make parameters defaults of other parameters? > No, currently the default parameter value must be specified as a literal string (with a colon, not an equals sign). Best wishes Jeremy. > > On Friday, July 10, 2015 at 9:25:03 AM UTC-5, Jeremy Ruston wrote: >> >> Hi Henry >> >> I think that there are two problems here: >> >> * The first is that transcluding a tiddler doesn't make macros defined in >> that tiddler available in the calling tiddler. You can instead either >> define it as a global macro by tagging it with $:/tags/Macro or you can use >> the <$importvariable> widget directly to import macro definitions from a >> tiddler >> >> * The second problem is that you don't need brackets when calling a >> macro. Try this: >> >> <<TaskListMacro ListTitle:"Not Started">> >> >> Best wishes >> >> Jeremy. >> >> >> >> >> On Fri, Jul 10, 2015 at 2:39 PM, Henry Padilla <[email protected]> >> wrote: >> >>> Macro Tiddler: >>> TitleField: >>> TaskListMacroSet >>> TextField: >>> \define TaskListMacro(ListTitle) >>> !!! Tasklist: $ListTitle$ >>> \end >>> >>> >>> Base Tiddler: >>> TitleField: >>> Not Started Task List >>> TextField: >>> {{TaskListMacroSet}} >>> <<TaskListMacro(ListTitle:"Not Started")>> >>> >>> ~~~~~~~~~~~~~~~~~~~~~~ >>> I've tried various combinations of $name$, $(name)$, $("name")$ and so >>> forth, to no avail. >>> I've been going step by step to build the tiddler I need (a list of >>> lists of tasks in certain statuses). I started with nothing special, >>> everything spelled out, and I've been working at transcluding and writing >>> macros a little bit at a time to make sure I get it right. But this has me >>> stymied. I can make it work with variables, i.e. using $(name)$ and the >>> <$set> pragma, but not parameters. >>> >>> Thanks ahead of time for the help. >>> Tom P. >>> >>> P.S. I have my macro tiddler taged with $:/tags/Macros and I still have >>> to transclude the macro tiddler to get it to work. Has that tag changed? >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "TiddlyWikiDev" 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/tiddlywikidev. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/tiddlywikidev/f6737c52-d42c-43f9-9e01-deb906b61819%40googlegroups.com >>> <https://groups.google.com/d/msgid/tiddlywikidev/f6737c52-d42c-43f9-9e01-deb906b61819%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Jeremy Ruston >> mailto:[email protected] >> > -- Jeremy Ruston mailto:[email protected] -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" 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/tiddlywikidev. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/CAPKKYJaqEgAb5FPotgKFnw0hj3dk2os3iheLvOHR4eJG_ZmGxA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
