The idea is it uses the one macro with a tag name to locate the actions to apply. Adding an action to any existing button requires you taging a tiddler containing the additional actions.
The key is that any number of action tiddlers can be used on any button. Any single action can be used on any nUmberto of buttons.
In the demo, a log action tiddler is tagged with all buttons custom action tag. As a result every button is using the additional action.
if a simlar solution is placed in the standard distribution, you do not need to modify core tiddlers to add custom actions. just place a tag on your custom actions. This allows multiple macros and plugins to use this mechanisium without clash.
Building your own buttons and other widgets with actions you can use the same mechanism. Rather than hard code actions use the tag mechanisium.
With tags you can add and remove them. You can have a run once by using an action tiddler that removes its own tag. You could even have a chain of such actions.
Does that help?
Tony
Working with link catcher is important to be able to place custom actions on opening tiddlers and the various ways you can.
I can visualise a few ways to do this without tags but this is a standard mechanisium for exposing hackability in tiddlywiki. The view and edit templates, sidebar and sidebar tabs and more use this.
Please tell me more why you think I should not use tags.
If you think that its important we not use tags do you have a design pattern that achieves the same result? E.g. any tiddler, any number, ordering, cumulative changes possible etc...
Finally if I deliver this as a plugin in the interim, I wonder how plugin shadows interact with core shadows?
Thanks for your feedback.
Please tell me more why you think I should not use tags.
- pre-actions and- post-actions
<$button preactions=<<pre-actions>> actions=<<my-actions>> postactions=<<post-actions>> ...>\define my-button-pre-actions() ...
\define my-button-actions() ...
\define my-button-post-actions() ...
<$button data-id="my-button" ...>
Mario and Coda, Thanks for the feedback.
- I wonder how these alternates stand against my suggestion of hackability through patchability.
- Please note for the "action on any button" I propose does not demand any differentiation between pre/main and post actions. It is simply used as a trigger.
- Can you explain further when and how one would want to differentiation between pre/main and post actions
I stand to be corrected but it seems to me deprecating actions widgets inside buttons is causing more problems than advantages and solves a "problem" not visible to most users and designers.
You are both already talking about fundamental changes to the button widget so it seems revisiting this is almost necessary anyway.
Perhaps another strategy would be to build a new widget, perhaps action-button that has the additional subtlety encoded. Perhaps designed from the ground up so that it works equally well with actions inside the button widgets, so this need not be deprecated.
which is obviously unworkable. But now I'm seeing:<$button preactions=<<pre-actions>> actions=<<my-actions>> postactions=<<post-actions>> ...>
Mario and Coda, Thanks for the feedback.
- I wonder how these alternates stand against my suggestion of hackability through patchability.