The problem is highlighted by something like this:

\define dropaction()
<$action-createtiddler $basetitle=<<actionTiddler>> />
<$list 
filter="[all[tiddlers]search:title<actionTiddler>sort[created]last[]]" 
variable="lastcreated">
<$fieldmangler tiddler=<<lastcreated>>>
<$action-sendmessage $message="tm-add-tag" $param=<<currentTiddler>>/>
</$fieldmangler>
</$list>
\end

<$droppable actions=<<dropaction>>>Some area to drop on
</$droppable>

... this brute-force approach doesn't work and will tag the second from 
last one since the action-createtiddler doesn't create a tiddler until the 
entire action is done.

None of these work now but maybe one of these solutions could be adopted in 
the core:
1) the DroppableWidget could be made to act more like the ButtonWidget in 
that actions within the widget are triggered so <$droppable 
actions=<<second_actions>> >  <<first_actions>>  </$droppable> would work. 
Right now only <<second_actions>> trigger.

2) DroppableWidgets (and ButtonWidgets) could be make nestable with inner 
widgets completing before outer ones so that you can have constructs like:

<$droppable actions=<<nth_drop_action>>>
...
<$droppable actions=<<second_drop_action>>>
<$droppable actions=<<first_drop_action>>>Some area to drop on
</$droppable>
</$droppable>
...
</$droppable>

3) ActionCreateTiddlerWidget could have a variable scope that acts like 
<$fieldmangler> to do things like: 
<$action-createtiddler $basetitle="Created Tiddler">
<<actions_that_use_currentTiddler_or_defined_variable_that_is_same_as_that_stored_in_$savetitle>>
</$action-createtiddler>

... however having the name won't help if the tiddler isn't created until 
the end.

Some potential RFEs ... none of which I have the skill to implement.

/Mike

On Friday, December 18, 2020 at 12:18:14 AM UTC-4 Mark S. wrote:

> On Thursday, December 17, 2020 at 7:33:30 PM UTC-8 TW Tones wrote:
>
>>
>>
>> Otherwise; *accept or generate the new tiddler name before  
>> $action-createtiddler  *
>>  
>>
>
> This somewhat obviates the utility of the $savetitle attribute, since the 
> results are not available  until the containing process is completed.
>
> So, for instance, you couldn't catch use $savetitle to create a reference 
> in another tiddler to the newly created tiddler until the process is done. 
> Meaning, at best, that the user has to push a button for a second time for 
> no apparent reason. (not apparent to the user, in any case).
>
>
>
>  
>

-- 
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/c0714637-67e0-434c-8a14-585d60d9076cn%40googlegroups.com.

Reply via email to