Re: [tw5] How do I get a list of tiddlers from a filter and then manipulate the fields / tags on each in a loop?

2020-04-16 Thread Xavier Cazin
Hi Andrew,

Action widgets can only be triggered by a user action, like clicking on a
button, dropping a tiddler, or loading the wiki. They can't be triggered
by, say, the $list widget, eventhough you may use a $list to produce some
of the action strings.

\define done()
<$action-listops $tags="done"/>
<$action-sendmessage $message="tm-copy-to-clipboard" $param=<>/>
<$list filter="[tag[bar]]">
  <$action-setfield foo="done"/>

\end

<$checkbox checkactions="<>"> Is it done?

In the example above, the list of actions to be executed when the box gets
checked are grouped in a macro.
The list of actions to be executed are most often passed to the control
widget via an *actions* attribute.

Best,
-- Xavier


On Thu, Apr 16, 2020 at 8:42 PM leeand00  wrote:

> I'm aware there are widgets that will modify them...for instance
> <$action-listops>
> can modify fields, but I don't know how to use a filter like
> [tag[some-tag-they-all-have]sort[create-or-mod-date]] and to loop through
> them performing a similar action on each.
>
> I'd also like to be able to include an index, or obtain them sorted by
> create-or-modification date.
>
> Thank you,
> Andrew J. Leer
>
> --
> 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/d03f9ffd-18d9-4f89-b0fd-82a32f9b54bd%40googlegroups.com
> 
> .
>

-- 
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/CADeSwYN9zMK9MjyJ2uFcs16%3D1tZykLN8Vrx1C0Z3QN%3Duaw2F1w%40mail.gmail.com.


[tw5] How do I get a list of tiddlers from a filter and then manipulate the fields / tags on each in a loop?

2020-04-16 Thread leeand00
I'm aware there are widgets that will modify them...for instance 
<$action-listops>
can modify fields, but I don't know how to use a filter like 
[tag[some-tag-they-all-have]sort[create-or-mod-date]] and to loop through 
them performing a similar action on each.

I'd also like to be able to include an index, or obtain them sorted by 
create-or-modification date.

Thank you,
Andrew J. Leer

-- 
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/d03f9ffd-18d9-4f89-b0fd-82a32f9b54bd%40googlegroups.com.