$param and param

61 views
Skip to first unread message

Mohammad

unread,
Jan 31, 2019, 1:36:37 PM1/31/19
to TiddlyWiki
As Joe Armstrong raised this question regarding $param here 


I wish to know why and where a parameter attribute is used as $param where as param and why?
It would be great to have a tiddler in documentation explain this.

Example

1.
<$macrocall $name=""  text=""
2.
<$tiddler tiddler="">

3.
<$set name="" value="">

4.
<$action-setfield $tiddler="" text=""/>

5.
<$action-sendmessage $message="" $param=""/>

6.
There are more


--Mohammad


TonyM

unread,
Jan 31, 2019, 3:18:30 PM1/31/19
to TiddlyWiki
Mohammad,

Did you not think my answer to joe adequate?

I accept it if you did not and will review further

Tony

Mohammad

unread,
Jan 31, 2019, 10:01:21 PM1/31/19
to TiddlyWiki
Hi Tony,
 Where is that? I cannot find it at


Furthermore is there a pull request for this to be added to documentation?

--Mohammad

TonyM

unread,
Jan 31, 2019, 11:31:56 PM1/31/19
to TiddlyWiki
Mohammadf at https://groups.google.com/forum/#!searchin/tiddlywiki/joe%7Csort:date/tiddlywiki/Tn95JfmmNE4/OCS1r7_JHAAJ
 
I said

As per S s answer but if I can explain the use of parameters occur when a widget or message may be used to pass other parameters to a macro or widget. By insisting on say $name= it makes it possible in the same macro or widget to set a parameter name="value" or $param= allows param=

Although I have not checked every case I think you will find parameters with leading $ exist whenever there is a desire to allow additional parameters without forcing reserved parameter names to be the exception.


I can see how this may not help in retrospect but help it explains why. Perhaps my explanation could be added to the doco, although it is already implied in some places.

Tony


However I am preparing some doc that also says

Why is it $name= instead of name= ?, because you may want to pass a named parameter called "name"
Since macros are effectively the same as a variable 


Regards
Tony
Reply all
Reply to author
Forward
0 new messages