Small tool to check and sort your startupactions

How do I show the tiddlers tagged $:/tags/StartupAction in the order they are processed?
Am I right to assume that the actions are executed from top to bottom in each tiddler following the tiddlernames from A to Z.
What is the best way append a sortfilter to the filter.

1 Like

The startup actions are processed in $:/core/modules/widgets/widget.js using this function:

Widget.prototype.invokeActionsByTag = function(tag,event,variables) {
	var self = this;
	$tw.utils.each(self.wiki.filterTiddlers("[all[shadows+tiddlers]tag[" + tag + "]!has[draft.of]]"),function(title) {
		self.invokeActionString(self.wiki.getTiddlerText(title),self,event,variables);
	});
};

Note that the function uses the tag[...] filter operator, and according to the documentation in https://tiddlywiki.com/#tag%20Operator:

which is processed using a set of rules documented here:
https://tiddlywiki.com/#Order%20of%20Tagged%20Tiddlers

Thus, to control the order in which startup actions are processed, you use a tiddler named $:/tags/StartupAction that contains a list field. The easiest way to create this tiddler is via drag-and-drop from the <<tag $:/tags/StartupAction>> tag pill, which will also show the actions in the order they are to be processed.

-e

3 Likes

Hi! with @EricShulman’s help and idea, I built a small tool to check and order the startupactions.
tiddlers.json (1.0 KB)

You can sort the order they are executed by dragging them and temporatily dectivate them. The deactivated ones are shown below to reanimate them with a click.

Enjoy!
Jan

I think there should be an emptyMessage:"No Startup Actions Active" if nothing is configured.

IMO your tiddlers.json should be renamed into something more “relevant”, so if downloaded, it should tell the user what it does.
-m