On Wednesday, August 18, 2021 at 3:25:22 AM UTC-7 vpl wrote:

> In fact my problem was linked to a button action and thanks to  
> https://tiddlytools.com/timer.html code sample I was able to find a work 
> an option 
> \define tasks_delete()
> <$vars  projectId={{{ [<currentTiddler>get[projectId]] }}}>
> <$reveal default="show" type="match" text="show">
> <$button class="tc-button tt-button" tooltip="delete this alarm"> 
> {{$:/core/images/delete-button}}
>         <$action-listops $tiddler=<<projectId>> $field="tasks" 
> $subfilter="-[[$(this_alarm)$]]" />
>   </$button>
> </$reveal>
> \end
> The $reveal seems to be mandatory to get access to my projectId variable 
> withing the button action-listops
>

Here's a trimmed down version that eliminates the unneeded excess syntax:
\define tasks_delete()
<$button class="tc-button" tooltip="delete this task"> 
{{$:/core/images/delete-button}}
   <$action-listops $tiddler={{{ [<currentTiddler>get[projectId]] }}} 
$field="tasks" $subfilter="-[[$(this_alarm)$]]" />
</$button>
\end

Notes:
* The $vars is not needed.  Instead, use $tiddler={{{ 
[<currentTiddler>get[projectId]] }}} directly in the $action-listops widget
* Eliminate the $reveal and /$reveal.  Quite obviously, "show" will always 
match "show", so this does nothing.
* Remove "tt-button" from the $button class="...";  this is a TiddlyTools 
custom classname that is almost certainly not defined in your TiddlyWiki.
* Fix the tooltip text to say "task" instead of "alarm"
* $(this_alarm)$ references a variable defined outside the tasks_delete() 
macro and should probably be changed to whatever variable holds the name of 
the task you are deleting.

-e

-- 
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/d20c117b-04c5-42a1-b023-1210d7e835d9n%40googlegroups.com.

Reply via email to