Mohammad,

Thanks for sharing. This could be quite a powerful method. I think the 
trick will be finding a way to use it to simplify coding perhaps by 
reducing the number of macros you need to remember by pushing them into 
parameters of a shared macro.

For example I have a desire to provide filters that generate a list of 
tiddlers however specify if they are displayed in an list, interactive 
table, print ready form or TOC structure.

Regards
Tony


On Friday, December 14, 2018 at 6:50:06 AM UTC+11, Mohammad wrote:
>
> By accident I learned an amazing feature of *macrocall* widget during 
> experimenting with *Thomas Elmiger* extract macro.
>
> Thomas used variable to make aliases of macro and call them using 
> *macrocall* based on different condition.
>
> As an example see (this is only for demo purpose, so it is very simple)
>
> \define mac(mytag, output:"simple")
>
>
> <$list filter="[tag[$mytag$]]" variable=v>
> <$macrocall $name=<<__output__>> p=<<v>> />
> </$list> 
>
>
> \end
>
>
>
> where simple here can be for example
>
> \define simple(p)
> <span style="color:red"><$view text=<<__p__>> /></span><br>
> \end
>
>
> You can call mac like
>
> <<mac "Concepts">>
>
> Now you can have a customized output like
>
> \define myout(p)
> <li><$text text=<<__p__>>/></li>
> \end
>
> <ol>
> <<mac Concepts output:"myout">>
> </ol>
>
>
> So, this is a great TW5 capability and you can send your customized output 
> to a macro already developed by other.
> This can also be used for core macro and lets user customize their output.
>
> You can test this on tiddlywiki.com! 
>
> --Mohammad.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/085ef9b0-2d13-44f1-9754-23aa2ae14944%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to