Hi Mohammad, Mark, The history here is that in v5.1.14 we added an "actions" attribute to the checkbox widget that specified an action string to be specified whenever the state of the checkbox changed. The same action string is executed regardless of whether the checkbox was checked or unchecked.
Then in v5.1.16 we merged https://github.com/Jermolene/TiddlyWiki5/pull/3182 which added the "uncheckactions" attribute. The difference between the two is that the uncheckactions are only executed if the checkbox is unchecked. The main "actions" attribute is executed before any actions in "uncheckactions", which makes it possible to arrange things so that the "actions" attribute sets things to the checked state while the "uncheckactions" attribute overwrites those changes to set things to the unchecked state. In retrospect, it would have made more sense to have also added a "checkactions" attribute that was executed only if the checkbox was checked. I'll investigate adding it for v5.1.20. Best wishes Jeremy. On Sat, Jul 13, 2019 at 9:15 PM Mohammad <[email protected]> wrote: > Thanks Mark! > I did not know this nor in the tiddlywiki.com explained! > But as your comment I used two checkbox one for actions and one for > uncheckedactions and now it works. > > Thank you Mark! > > Best regards > Mohammad > > On Saturday, July 13, 2019 at 11:58:45 PM UTC+4:30, Mark S. wrote: >> >> Without going over the code in detail, keep in mind that the "action" >> attribute gets run both when the box is checked AND when it is unchecked. >> You >> may have to wrap your action code in a list or reveal widget to prevent >> "actions" from occurring during uncheck. >> >> My apologies if you have already allowed for this. >> >> On Friday, July 12, 2019 at 9:24:33 PM UTC-7, Mohammad wrote: >>> >>> >>> *Problem* >>> A checkbox widget is used to switch done/undone state it uses >>> >>> - A state tiddler to store states: done / undone >>> - A task tiddler to store a pair value/item like *test:2019* >>> - A done tiddler to store a pair value/item like *test:2019* >>> >>> *It uses actions and uncheckedactions* >>> >>> - When the status is done the actions calls a macro to move the >>> item/value to done tiddler >>> - When the status is undone the uncheckedactions calls a macro to >>> move item/value to task tiddler >>> >>> *Issue* >>> >>> - The actions macro/parameter seems to work fine >>> - The uncheckedactions fails: *It moves item/value to task tiddler >>> but the value is empty!!* >>> >>> To reproduce the issue a set of tiddlers is attached. Also the below >>> wiki can be used to reproduce the issue >>> >>> http://hirad.tiddlyspot.com/ >>> >>> >>> *Further note* >>> Both macros are used for actions /uncheckedactions are tested separately >>> using buttons and seems they are correct!! >>> >>> >>> Best regards >>> Mohammad >>> >>> -- > 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/1d55c7a4-8232-42d8-b487-c5ce27df4a4a%40googlegroups.com > <https://groups.google.com/d/msgid/tiddlywiki/1d55c7a4-8232-42d8-b487-c5ce27df4a4a%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Jeremy Ruston mailto:[email protected] -- 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/CAPKKYJbdse6faWOnHS1BCcrKa5BHxzrGsJ0W03Y1o79jkfmAKw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

