[tw5] Re: Wikified macro notation suggestion

2020-03-12 Thread Stobot
Interesting - thanks.

Looking at my use-cases more thoroughly since Tony asked, they do all seem 
to fall into the inability to "nest functions" (functions being widgets in 
TW) using wikitext. My use cases fall within a couple common buckets

1. Dates: I use a lot of my wikis for project management, so I'm using 
things like <> / <$macrocall name="dateadd" basedate=... 
days=.../> to build a new date, then use that within a filter string
2. General lookups: Using one macro to determine a "tiddler type" based on 
it's tags, then using that in a filter or logs (createtiddler action 
widgets)
3. Fallbacks: Again going back to dynamic tables, I'll do something like 
have an edit-box the user can use for limiting number of results, and then 
have to use that number in a filter later. Since I want a default value in 
case the user doesn't use the edit-box, I use a <$list filter="..." 
emptyMessage="10">{{!!title}} pattern to get their value (or the 
fallback value), and then build that into the filter string. 

Jeremy, it sounds like what you're saying is that I can up-front create my 
own version of "\define" once at a wiki level, and then use that when I 
know I need the results wikified - is that right? I tried to follow some of 
your notes on pragma, but it looked like those notes may have been to 
address something else. Is this possible within wikitext, or would I need 
to build a javascript thing? (I'm not javascript native, but could maybe 
adapt a similar example if you knew of one). 

Also, going back to Mat's comment, I'll have to play with the "select=0" of 
<$set> to see how that can help me - always looking for performance gains!

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c8c93c08-79c1-451f-8f84-d93f27b088c6%40googlegroups.com.


[tw5] Re: Wikified macro notation suggestion

2020-03-09 Thread Mat
Stobot wrote:
>
> I don't know if anyone else builds things like I do - with a ton of 
> dynamic tables and branched lookups, but I use this pattern all the time:
>

(probably not ;-) 

I want to call your attention to that $wikify is a very expensive widget, 
especially if you nest them.
Often, but not always, the same result can be achieved with the $set widget 
and its attibute set to select=0 

I'm not qualified to answer you actual question.

<:-)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b43a2bb1-f769-4d46-976c-334f891827d2%40googlegroups.com.