Hi Tony,
Sorry for the late answer...

You are right, I am sometimes confusing this google group with a Tiddlywiki 
FAQ + code review + ideas box + many other things ;-)

My main question was not really about how to solve my specific problem, but 
the generic problem of using recursive macros and if then else nested 
statements in the macros. 

I'm used to using functions, and in those a simple "return value" will skip 
the rest of the function code. Clear and short code.

In macros, I'll display the output "value" but then I have to make sure 
that the rest of the code is not executed, i.e. that it doesn't display and 
execute other stuff. That is, I need to make sure that I'll reach the 
"\end" of the macro without executing anything - as if I did return a value 
in a function. 

Because of this "as if", i.e. because I have to make sure I'll reach the 
end of the macro code without executing anything once I've output what I 
wanted, I have to use a lot of if then else statements, nested, i.e. a lot 
of "<$list filter=...>" statements.

And because of that, the code I write seems to me hard to read, hard to 
understand later on and hard to maintain. (cf nested lists in my original 
post)

And so, this is so surprising to me that I end up with a code I am not 
comfortable with, not happy with, that I wondered if there was something I 
completely missed with macros and nested if-then-else statements.


If that's just the way it works, then OK... Otherwise I'd be happy to learn 
how to produce a better code :)

Best,
And have a good day everyone !


Eric


On Thursday, May 14, 2020 at 3:38:20 PM UTC+4, TonyM wrote:
>
> Eric
>
> Love the way you are thinking some of us have done similar things. I think 
> it is as easy as anywhere to do this kind of thing. Of course it has its 
> own complexity. I would look at solving component issues then bring them 
> together in a solution.
>
> I can help more later but consider a custom new here button which passes 
> more to the child tiddler than a tag. Its easy to creat a tiddler with 
> additional fields. I have posted on setting context before but a simple 
> fieldname={{!!fieldname}} in the creat tiddler can do a lot.
>
> I will see what other tips I can share when next at my desktop.
>
> Regards
> 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/6e270145-48cb-4e8b-88e5-df5226cb360a%40googlegroups.com.

Reply via email to