Folks, In recent and soon to be released versions of tiddlywiki a number of widgets now use the parameter pairs $names $values, $fields $values and $indexes $values.
I have started this topic to ask how you use or may utilise this “parameterisation method”. Start a discussion to share how to make use of them to see;
- See how people are using these
- Contribute to understanding and ultimately improving the community support and documentation
- Provide examples to help people using such patterns
- Show when it may be superior to a simple set of let/vars/set name=value pairs, or not for that matter.
For example;
With these pairs a simple set of corresponding names/values or filters that generate these can be provided.
- One condition is the pairs need to have a one to one correspondence, as a result you may need to provide a “when blank value”.
I believe this approach to parameters is only going to increase in future versions, and I don’t think “I am alone” in thinking this can be a little confusing to make use of.
- This is different to passing parameters as keyword value pairs keyword=“value” or keyword:“value” we are more familiar with. Also called attribute value pairs.
- It may be useful with some set or hardcoded cases, but what if a variable number of keywords are available, such as fieldnames on the current tiddler?
- Or the keywords refer to a list of titles
I can see that such an approach may even be necessary in some causes but how can we;
- Provide more guidance on their use?
- Especially handing potentially empty values
- Make use of this approach in novel ways
- especially in the GenesisWidget
- its relationship to other attribute value pairs in tiddlywiki and html
- This was in part in response to a need to pass multiple and a variable number of parameters to to a widget or macro, but how do we do this?
Please share what you know with the community and let us start the conversation!
Extended potentials?
- Could we make use of this to process keyword/value pairs into variable/value or variable/value pairs?
- Or the reverse?