Thank You Eric, my job chaining is now working!

And I know what to do next (hum... first :-) as a payback for the 
community: propose a change in the official doc that tells this feature you 
wrote. Because this is not tge case currently. At one point, it evens 
states that "Embedding the actions within the triggering widget (an older 
technique that is now deprecated)".

Just to be really true about this order thing, is it really true that 
nothing more can be warranted for the order of execution : no third batch, 
no order within each batch.

especially:

<$button>
<<macro-for-action-01>>
<<macro-for-action-02>>
</$button>

one cannot say anything about the order of execution of the <$action-XXX> 
within macro-for-action-01 AND macro-for-action-02 **relatively to one lot 
relative to the other  BUT ALSO within each lot? Maybe that defiance can be 
restricted to some features only?

Surely I should avoid being too precise: these (precious) details have to 
be written by experts.

Le jeudi 6 mai 2021 à 20:35:56 UTC+2, Eric Shulman a écrit :

> On Thursday, May 6, 2021 at 5:24:11 AM UTC-7 [email protected] wrote:
>
>> In my project I need to first create a new project with an identifier (an 
>> input data) then to offer a complete input of the project to the user.
>> I have crafted this macro invoked when the identifier is ready to be used.
>>
>
> Assuming that your macro is triggered by a button press, you can split the 
> actions into two separate parts.  The first part is specified in the body 
> of the $button widget, and the second part  is specified using the 
> actions=... parameter of the $button widget.  When the button is pressed, 
> the "body" actions are performed (and *completed*) first, followed by the 
> "parameter" actions.   For example:
>
> \define target()         TargetTiddler
> \define button_actions() <$action-setfield $tiddler=<<target>> 
> timestamp2=<<now "0hh0mm0ss0XXX">> />
> <$button actions=<<button_actions>>> click me
>    <$action-setfield $tiddler=<<target>> timestamp1=<<now 
> "0hh0mm0ss0XXX">> />
> </$button>
>
> When the $button is clicked, the "timestamp1" field is written first and 
> then the actions=... is triggered, writing the "timestamp2" field.
>
> Also, as a side note, the $set widgets in your code could be written more 
> simply using $vars and "transcluded filter" syntax, like this:
> <$vars project={{##project}} autoref={{{ [{##project}addsuffix[/project]] 
> }}}>
>
> Hopefully, the above code examples should get you pointed in the right 
> direction.
>
> enjoy,
> -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/e19d8e4f-6e87-4f5d-80bb-82bc5cf1bfd4n%40googlegroups.com.

Reply via email to