Hi,
I'm back to work on a TiddlyWiki to manage my collection of drama 
exercises, but I came across 2 problems with displaying their sources and 
refreshing that display.

Problem #1:

My 'exercises' tiddlers all refer to a 'SourceDisplay' macro to show the 
sources.
If I use a field to trigger the macro to show or hide the sources, they 
appear in 'Exercise1' tiddler, but not in 'Exercise2'. If I paste 
<<SourceDisplay prefix:"ref_">> in the text field of each of the Exercise 
tiddlers, it works fine.
I suppose something like 'qualify' might solve the trick, but I don't know 
how to use it. Perhaps any of you has a better solution to suggest anyway, 
but I can make do with copying-pasting the macro call.

Problem #2 (more serious to me):
I changed the contents and title of tiddler "source1" to a more realistic 
name ('Dramaction' here) and contents and updated the the fields 
accordingly.

I made 4 dummy source tiddlers. When I deleted the 'ref_source1' field in 
'Exercise1' and replaced it with a 'ref_dramaction' field, I also noticed 
that there were now 4 sources in the list instead of 3. One line is blank, 
which I suppose is the ghost of 'source1', without any data, of course, 
since that content doesn't exist any more. It's as if old 'source1' data 
wasn't purged, or TW still expected that content to exist alongside the new 
'dramaction' content. It also happens every time I delete one of those 
fields.

Also, when I delete the 'ref_source1' field in 'Exercise2', the list of 
sources gets updated in 'Exercise1', but not in Exercise2, which showed the 
same problem as in the previous paragraph.

Thanks in advance for your help.


Here is the link to a MWE you can download, to see what I mean:

https://u.pcloud.link/publink/show?code=XZmdnCXZmtUJk3s4tCfxvYwlXQmYnXrL8RJV

And below is the macro I am talking about:

```
\define SourceDisplay(prefix:"")
<$set name="fieldCount" filter="[fields[]prefix[$prefix$]count[]]">
<$text text={{{ [<fieldCount>match[0]then[Pas de ]else<fieldCount>] }}} />
<$text text={{{ [<fieldCount>!match[1]then[sources :]else[source :]]  }}} />
</$set>
<span class="source">
<ul>
<$list filter="[fields[]prefix[$prefix$]sort[title]]" variable="fieldName">
<li>
<$transclude field=<<fieldName>>/>
</li>
</$list>
</ul>
</span>
\end
```

-- 
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/3d234f73-878e-487b-8011-20c4cae84f56n%40googlegroups.com.

Reply via email to