-
Is there a way to trigger "Action Widget" (ex. action-createtiddler) without a user input? either from a JavaScript Macro or WikiText Macro? In other words, what is my options to "create tiddlers" without user inputs from within my Macros (WikiText or JavaScript)? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
I did create a See: https://wikilabs.github.io/editions/trigger/ ... There is not much docs except the code of the test framework itself. ... In the "demo" wiki I did still use buttons to trigger "next" and "previous" actions. ... BUT it would be possible to create something that "runs" automatically, since an active action can trigger the next one by opening the tiddler, which contains that action. |
Beta Was this translation helpful? Give feedback.
-
Eric Shulman has a similar widget, that can be tirggered with a timer. See https://talk.tiddlywiki.org/t/tw5-export-tiddler-automatically/1929/3?u=pmario |
Beta Was this translation helpful? Give feedback.
-
@msameen99 It would be helpful if you described the broader context of what you are trying to do. If this is in relation to the "heavy calculations" that you mentioned in another thread, what is the source of the data for the calculations? When do the calculations need to take place: on wiki load, when a tiddler is opened or in response to another trigger? |
Beta Was this translation helpful? Give feedback.
-
Action widgets can only be triggered by events, particularly user interface events like button clicks, but also timers and scroll events. JavaScript macros must not have side effects, and so must not trigger action widgets.
A common pattern for calling a JS function that returns a large amount of structured data is to use a widget message to trigger the function, passing parameters as required. The function should return its results by creating as many interlinked tiddlers as it needs. The plugin library uses this pattern: the See: https://tiddlywiki.com/#WidgetMessage%3A%20tm-load-plugin-library |
Beta Was this translation helpful? Give feedback.
Action widgets can only be triggered by events, particularly user interface events like button clicks, but also timers and scroll events.
JavaScript macros must not have side effects, and so must not trigger action widgets.
A common pattern for calling a JS function that returns a large amount of structured data is to use a widget message to trigger the function, passing parameters as required. The function should return its…