Folks,
I am raising this here because it is developer’s who more likely to be able to understand and answer this question, I also expect it to be of less interest to the community in general. Perhaps the answer also needs a developer solution.
I have a set of actions where I wish to do the following;
- Set some fields and tiddlers to some value
-
Save the Wiki (assume autosave is possible ie no need for default saver)
- eg On GitHub, tw-receiver and Timimi
- Set some cookies
- Reload the wiki
Observations
- During some tests, I found the reload occurring before the wiki was saved, thus loosing the changes to fields and tiddlers.
Design considerations
- Although just testing with buttons I aim to move the set of actions into startup actions and I want them all to take place before the user gets access.
The Question(s)
- Is there a way to, not proceed to the next action until a save tm-save-wiki action is reported completed?
- If not could the tm-save-wiki action just not return control until it completes?
- Perhaps an alternative to the ActionConfirmWidget but not necessarily interactive could be designed to proceed only after saving completes.
- Could the reload action, if nothing else, test for and wait for save completion?
- Failing any of the above would it be possible to trigger the save then have a timed wait before proceeding to the next action, not unlike ActionConfirmWidget but for a time only. Perhaps displaying a count down and message. “Please wait N seconds”.
Final note;
If a solution does not exist yet and one needs to be developed I can use the interactive ActionConfirmWidget in the mean time, however if a solution must be developed, could we try and make it generic in nature that it has a broader application?
For example improve the ActionConfirmWidget to accept one or more of the following;
- The interactive confirmation (current)
- Confirm when save completed
- Confirm when N seconds has passed