As an explanation of what is going on (node the added button, this doesn't do 
anything with the button):


<$button>

Add tags

<$list filter=<<SomeFilterHere>>>
<$fieldmangler>
<$action-sendmessage $message="tm-add-tag" $param=<<__newTag__>> />
</$fieldmangler>
</$list>

</$button>


The list widget makes a list, one way to think about it is as iterating over a 
loop, but if you are familiar with some programming it is more accurately list 
comprehension similar to python (I think also erlang and haskell, it has been a 
while. Many other languages probably use the same concept).


So a possibly way too detailed description of the list widget:


The filter creates a list of titles

The template between the opening and closing tags for the $list widget is 
applied to each title returned by the filter

The results are output in the same order as the titles in the list


The $fieldmangler widget is magic, it is mostly left over from a previous 
version of how we thought tiddlywiki was going to work. Mostly it lets you add 
tags without overwriting the tags field. This is the only time when it is 
required or that there isn't a simpler way to do it. The magic is that it lets 
you edit fields, but that was before the action widgets became the main tool 
for changing tiddlers so it is less useful now.


The $action-sendmessage widget is a way that the older message-based changes to 
the wiki are used with the newer action widgets. It was a more conceptually 
complex system, I suggest that you just accept the magic for now and come back 
to that part later. Just treat the combination of $fieldmangler and 
$action-setfield widgets in this context like an action widget that lets you 
add a tag to a tiddler.


Then, if you wrap that whole thing in a button, the result is a button that 
activates a list of action widgets, each action widget adds a tag to one 
tiddler.


Hopefully that is understandable and not too rambling.

-- 
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 post to this group, send email to [email protected].
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/9bcadc92-45fe-453f-87fc-ba7eb903c378%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to