[TW5]Button actions wit tm-delete-tiddler message

60 views
Skip to first unread message

FrD

unread,
Aug 22, 2016, 10:33:36 AM8/22/16
to TiddlyWiki
Hi,

I'm trying to delete a tiddler and have some actions performed by a button. Something like this :

<$button message="tm-delete-tiddler" param="Tiddler" actions=<<actions>>>
Delete</$button>

where actions is :

\define actions()
<action-setfield .../>
<action-setfield .../>
\end

It seems like the actions are not performed. So I tried to put directly the actions inside the button, but with no result either. Th tiddler is deleted but nothing else.

Am I doing something wrong or is it not possible to have actions at the same time of using the 'tm-delete-tidler' message ?

Thanks in advance

Regards

FrD

Mark S.

unread,
Aug 22, 2016, 11:11:52 AM8/22/16
to TiddlyWiki
I've had pretty good luck putting all the actions (including the delete) inside the button. For instance, this seems to work:

\define actions()
<$action-deletetiddler $tiddler="DeleteMe" />
<$action-setfield $tiddler="MakeMe" text="Hi! How are you?"/>
\end
<$button>Do stuff<<actions>>
</$button>


You should share the action-widgets you're using and how you have them set up. More importantly, you might indicate exactly *what* you want to do.

Good luck!
Mark

FrD

unread,
Aug 22, 2016, 11:25:53 AM8/22/16
to TiddlyWiki
Hi Mark,

Thanks for your reply. I'll try to use <$action-deletetiddler>.
But for me the drawback is that it doesn't ask to confirm the action and the story is not updated.

Basically what I want to do is to delete a tiddler and then to change the value of some field in two tiddlers.

Regards

FrD

FrD

unread,
Aug 22, 2016, 11:38:53 AM8/22/16
to TiddlyWiki
Hi all,

My bad. It works ; I forgot to use a variable in a <$list> widget that contains the button, and so the actions were not performed in the right tiddlers !

Regards

FrD
Reply all
Reply to author
Forward
0 new messages