Charlie,

I have asked for similar in the past but learned this is the consequence of 
tiddlywikis model and we just need to work around it. 

Your commit really takes place at the end of the trigger that initiates it.

here is a quick dump of thoughts, on an other wise complex topic. I hope it 
helps. Please ask more or share a usable demo.

They key way is to structure your design to generate and store the values 
in variables and use those inside the same macro, even if you are writing 
your macros to store these values externally later. 

In some ways you can make a solution that generates a result to review, 
then a separate click commits it to a tiddler. The same macro can first 
determine if the previous step has already occurred and use the information 
there in to proceed.

Whilst this may all at first seem unnecessarily complex, do remember this 
comes about because of TiddlyWiki unique approach and features, a key one 
being always interactive and self refreshing. In some ways it does not 
support reiterative batch processes, but there is possibly always another 
way to achieve it.

The closest I have come to in what you are asking for is a button creating 
a tiddler containing a macro definition that is tagged as a macro and 
becomes available as a global variable once written, which is used in a 
subsequent step.

Another, may be to trigger an action on navigate to a tiddler, then the 
first step the user takes with a button click is actually the second step 
which is to commit the change and reevaluate.

Another technique I have used is restartable solutions - ie first time it 
commits every thing, second time it only finds changes and commits only the 
changes, The second commit is what you may call update or refresh. But 
until then what you see is the final result (so far).

Regards
Tones 

On Thursday, 27 May 2021 at 11:10:16 UTC+10 [email protected] wrote:

> G'day all,
>
> I've working on one large "actions" macro that uses a tiddler as storage 
> of values in a multi-stage processing of data, expanding and contracting 
> data (data transformation), iterating incrementally towards a final 
> destination.
>
> I've noted, and it makes sense to me, that as a macro writes to a tiddler 
> (i.e. setting field values), the same macro can't read in those values.
>
> I've also noted that after a macro writes to a tiddler, the macro can 
> access fields from the same tiddler after a <$action-confirm> prompt.
>
> Is there an alternative that does not involve user interaction that can, 
> within one macro, commit writes to a tiddler such that the macro can 
> subsequently read the tiddler ?
>
> I guess I'm asking for some sort of "action-commit-edits" widget.
>
> Not quite sure what to look for, and: please be gentle!  This is foreign 
> territory for me, and I might need a bit of a vocabulary lesson and 
> for-dumb-dumbs education about whatever related mechanisms need 
> understanding.
>
> Thanks much, and cheers !
>
> Cheers !
>

-- 
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/6c334d50-473f-487e-a383-8175d21beb2en%40googlegroups.com.

Reply via email to