Hi,

You need to wrap your tag related widget messages in the fieldmangler 
widget. Working code below:

\define uncheck-high-priority()
<$fieldmangler>
<$action-sendmessage $message="tm-remove-tag" $param="high-priority"/>
</$fieldmangler>
\end

\define uncheck-low-priority()
<$fieldmangler>
<$action-sendmessage $message="tm-remove-tag" $param="low-priority"/>
</$fieldmangler>
\end

<$checkbox tag="high-priority" checkactions=<<uncheck-low-priority>>> High 
Priority</$checkbox>

<$checkbox tag="low-priority" checkactions=<<uncheck-high-priority>>> Low 
Priority</$checkbox>

Regards,
Hubert

On Tuesday, 12 November 2019 21:40:09 UTC, si wrote:
>
> I have a 'task' tiddler that displays checkboxes to indicate the priority 
> of the task:
>
> <$checkbox tag="high-priority"> High Priority</$checkbox>
>
> <$checkbox tag="low-priority"> Low Priority</$checkbox>
>
> I've tried to get it so that if I check one of the boxes the other will be 
> unchecked automatically.
>
> I have tried using the checkactions attribute as follows:
>
> \define uncheck-high-priority() <$action-sendmessage $message=
> "tm-remove-tag" $param="high-priority"/>
> \define uncheck-low-priority() <$action-sendmessage $message=
> "tm-remove-tag" $param="low-priority"/>
>
> <$checkbox tag="high-priority" checkactions=<<uncheck-low-priority>>> High 
> Priority</$checkbox>
>
> <$checkbox tag="low-priority" checkactions=<<uncheck-high-priority>>> Low 
> Priority</$checkbox>
>
> Weirdly this works as expected when I try it in the preview pane while 
> editing the tiddler, but when I save the tiddler it ceases to work.
>
> Does anyone know what's going on here?
>
>

-- 
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/4336b659-0c7b-4f66-a787-38d6a295ce25%40googlegroups.com.

Reply via email to