Mark

Examples that can be installed and work on tiddlywiki.com or empty.html 
would help us work with you. See how you go after correcting the current 
tiddler.

In macros the previous current tiddler value is available with 
$(currentTiddler)$ so you do not have to pass it as a parameter.

Regards
Tony

On Tuesday, July 21, 2020 at 6:17:34 AM UTC+10, Mark Green wrote:
>
> For those who have been following my efforts with mod- fields, this is the 
> next chapter - thanks for all the help so far!
>
> Currently, ModifierBlockMacro contains:
>
> \define innermodifierblock(for:"")
> $for$
> <$set name="x" value=<<__for__>> >
> <$set name="mfield" filter="[title<x>lowercase[]split[ 
> ]join[_]addprefix[mod-]]">
> <$list filter="[all[tiddlers]has<mfield>]">
> <tr><th><$link/></th><td><<x>></td><td><$view field=<<mfield>> /></td></tr>
> <<innermodifierblock <<currentTiddler>>
> </$list>
> </$set>
> </$set>
> \end
>
> \define ModifierBlock(for:"")
> <table>
> <<innermodifierblock $for$>>
> </table>
> \end
>
> Tiddler ModifierBlockTest contains <<ModifierBlock test>> and has no 
> fields.
>
> Tiddler InheritModTest contains no text but has field mod-test: Level1.
> Tiddler InheritModTest1 contains no text but has field mod-inheritmodtest: 
> Level 2.
>
> So what should happen is:
> <<innermodifierblock test>> runs
> It adds InheritModTest to the list because of its mod-test
> <<innermodifierblock inheritmodtest>> runs
> It adds InheritModTest1 to the list because of its mod-inheritmodtest
> <<innermodifierblock inheritmodtest1>> runs
> It adds nothing to the list because there is no mod-inheretmodtest1 
> anywhere
> <<innermodifierblock inheritmodtest1>> ends
> <<innermodifierblock inheritmodtest>> ends
> <<innermodifierblock test>> ends
>
> What actually happens is that TiddlyWiki crashes with an infinite 
> recursion error, constantly repeating the first line of the list with 
> "InheritModTest - test - level1" on it, followed by "InheritModTest" as it 
> indicates the start of the new loop. It seems that it is confusing the two 
> $list s running in different recursive scopes. Is there any way around this?
>
>

-- 
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/31d64903-5d61-473e-bd77-9183e01c2e98o%40googlegroups.com.

Reply via email to