Here is a dynamic table I am using - My TiddlyWiki — a non-linear personal web notebook .
I am using procedure to define dynamic tables - code is given here - My TiddlyWiki — a non-linear personal web notebook
I have defined many variables within different sections of the dynamic table procedure using let widget. But I want to use parameter widget to define some of these variables so that I can directly add those parameters during the procedure calls.
How to do this conversion from let widget to parameter widget ? Should i convert all variables defined using let widget to parameter widget ? Is there anything that I should keep in mind while added parameter widget ?
Inside your procedure you can wrap the rest of the content in a $parameters widget, by defining a parameter and giving it default or computed value it effectively replaces the need for a let/set/var widget to define it.
You can but I would only do this for things you want to be able to set via a parameter,
- This makes it clear if it can be influenced from outside (with a parma)
- or is only present inside the procedure (with a let/set/vars).
Until you experiment and gain a deeper understanding don’t define parameters in the procedure definition \procedure procname(para1 param2:"val") AND the $parameters variable at the same time. You can but it may lead to confusion.
Thank you @TW_Tones for the reply. I have started to modify the code to use parameter widget also. But it will take some time to complete the work.
I have posted a doubt regarding this usage of parameter widget in another post - Help need to define a conditional parameter for a procedure