[tw5] Re: syntax -- are "$"s important?

2019-02-21 Thread Mohammad
That's quite correct S.S.

I would be great if in your TW Documentation project these difference 
highlighted.

Cheers
Mohammad

On Friday, February 22, 2019 at 5:24:52 AM UTC+3:30, S. S. wrote:
>
>
> Just as a note, the $vars widget is the opposite - the attribute 
> specifying the variable name *cannot* start with a $
>
> All 7 Action Widgets  use $*named* 
> attributes, so:
>
> $macrocall
> $ActionCreateTiddlerWidget
> $ActionDeleteFieldWidget
> $ActionDeleteTiddlerWidget
> $ActionListopsWidget
> $ActionNavigateWidget
> $ActionSendMessageWidget
> ActionSetFieldWidget
>
> I could not easily spot any other Widgets that use them.
>
> Regards
>
> On Friday, February 22, 2019 at 4:32:23 AM UTC+7, TonyM wrote:
>>
>> Mohammad,
>>
>> This includes
>> *$macrocall*
>> *ActionCreateTiddlerWidget*
>> *ActionDeleteFieldWidget*
>> *ActionSendMessageWidget*
>> *ActionSetFieldWidget*
>> *VarsWidget*
>>
>> Each of the above need to be able to have the the parameter name=value 
>> thus provide $name=parmval to stop a clash. They are all quite general in 
>> nature.
>>
>> It is actually very simple, Ask yourself in any given widget may you need 
>> to be able to set a value (Typically a field) of the same name as on of the 
>> documented parameters?
>>
>> Regards
>> Tony
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3ea7f02a-5a17-4c65-8e78-9802bc8b3af8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: syntax -- are "$"s important?

2019-02-21 Thread Mohammad
Tony!
 I think the problem is backward compatibility.

Cheers
Mohammad


On Friday, February 22, 2019 at 1:31:59 AM UTC+3:30, TonyM wrote:
>
> Mohammad,
>
> I understand but if you used $name in Wikify my rule above would be 
> broken, and it would be impossible to tell when to use it and when not to. 
> The only way out would be to change all widget parameters to begin with a $
>
> This issue can only be solved by understanding why the $ is used and in 
> which cases, which is after all a small list and noted in the documentation.
>
> Regards
> Tony
>
>
> On Friday, February 22, 2019 at 8:43:52 AM UTC+11, Mohammad wrote:
>>
>> Hello Tony!
>> Thank you for clarification. I understood the reason!
>> But for simplicity I asked why not use $ also for wikify widget 
>> attributes! I mean this way it much more simpler to learn.
>> and it is kind of semantic naming rule.
>>
>> By the way I respect developer opinion!
>>
>> I share my own experience, I have to keep tiddlywiki.com open all the 
>> time, because when coding (specially a little complex one) I mixed these 
>> things and
>> I had cases, it took me hours to debug the code.
>>
>> Cheers
>> Mohammad
>>
>> On Friday, February 22, 2019 at 1:02:23 AM UTC+3:30, TonyM wrote:
>>>
>>> Mohammad,
>>>
>>> I may be confusing to you now but with respect it is not.
>>>
>>> In wikify you will never need to provide another parameter other than 
>>> defined in the the wikify macro
>>> AttributeDescription
>>> name The name of the variable to assign
>>> text The text to parse and render
>>> type The ContentType  of the text 
>>> (defaults to text/vnd.tiddlywiki)
>>> mode The parse mode: block (the default) or inline
>>> output Keyword indicating the desired output type, defaulting to text (see 
>>> below)
>>> However in The $macrocall widget you may very well want to define a 
>>> field called "name" and give it a value bvecaue you may have a field called 
>>> name, thus $name is used for the parameter
>>>
>>> The advantage of the widget form is that it allows macro parameters to 
>>> be specified as widget attributes
>>> *parameters* Macro parameters specified as attributesThis includes
>>> *$macrocall*
>>> *ActionCreateTiddlerWidget*
>>> *ActionDeleteFieldWidget*
>>> *ActionSendMessageWidget*
>>> *ActionSetFieldWidget*
>>> *VarsWidget*
>>>
>>> Each of the above need to be able to have the the parameter name=value 
>>> thus provide $name=parmval to stop a clash. They are all quite general in 
>>> nature.
>>>
>>> It is actually very simple, Ask yourself in any given widget may you 
>>> need to be able to set a value (Typically a field) of the same name as on 
>>> of the documented parameters?
>>>
>>> Regards
>>> Tony
>>>
>>> On Friday, February 22, 2019 at 1:50:53 AM UTC+11, Mohammad wrote:

 Unfortunately it is confusing

 <$wikify name= ...
 <$macrocall $name= ...


 I would recommend for widget, use widget parameter with $ and 
 everything else without it!
 But seems for backward compatibility there are very hard to revise!

 --Mohammad

>>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b0083415-5375-432d-84a5-51dfe68571a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: syntax -- are "$"s important?

2019-02-21 Thread S. S.

Just as a note, the $vars widget is the opposite - the attribute specifying 
the variable name *cannot* start with a $

All 7 Action Widgets  use $*named* 
attributes, so:

$macrocall
$ActionCreateTiddlerWidget
$ActionDeleteFieldWidget
$ActionDeleteTiddlerWidget
$ActionListopsWidget
$ActionNavigateWidget
$ActionSendMessageWidget
ActionSetFieldWidget

I could not easily spot any other Widgets that use them.

Regards

On Friday, February 22, 2019 at 4:32:23 AM UTC+7, TonyM wrote:
>
> Mohammad,
>
> This includes
> *$macrocall*
> *ActionCreateTiddlerWidget*
> *ActionDeleteFieldWidget*
> *ActionSendMessageWidget*
> *ActionSetFieldWidget*
> *VarsWidget*
>
> Each of the above need to be able to have the the parameter name=value 
> thus provide $name=parmval to stop a clash. They are all quite general in 
> nature.
>
> It is actually very simple, Ask yourself in any given widget may you need 
> to be able to set a value (Typically a field) of the same name as on of the 
> documented parameters?
>
> Regards
> Tony
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ea6e1494-fe00-4c78-892e-001d14ded123%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: syntax -- are "$"s important?

2019-02-21 Thread TonyM
Mohammad,

I understand but if you used $name in Wikify my rule above would be broken, 
and it would be impossible to tell when to use it and when not to. The only 
way out would be to change all widget parameters to begin with a $

This issue can only be solved by understanding why the $ is used and in 
which cases, which is after all a small list and noted in the documentation.

Regards
Tony


On Friday, February 22, 2019 at 8:43:52 AM UTC+11, Mohammad wrote:
>
> Hello Tony!
> Thank you for clarification. I understood the reason!
> But for simplicity I asked why not use $ also for wikify widget 
> attributes! I mean this way it much more simpler to learn.
> and it is kind of semantic naming rule.
>
> By the way I respect developer opinion!
>
> I share my own experience, I have to keep tiddlywiki.com open all the 
> time, because when coding (specially a little complex one) I mixed these 
> things and
> I had cases, it took me hours to debug the code.
>
> Cheers
> Mohammad
>
> On Friday, February 22, 2019 at 1:02:23 AM UTC+3:30, TonyM wrote:
>>
>> Mohammad,
>>
>> I may be confusing to you now but with respect it is not.
>>
>> In wikify you will never need to provide another parameter other than 
>> defined in the the wikify macro
>> AttributeDescription
>> name The name of the variable to assign
>> text The text to parse and render
>> type The ContentType  of the text 
>> (defaults to text/vnd.tiddlywiki)
>> mode The parse mode: block (the default) or inline
>> output Keyword indicating the desired output type, defaulting to text (see 
>> below)
>> However in The $macrocall widget you may very well want to define a field 
>> called "name" and give it a value bvecaue you may have a field called name, 
>> thus $name is used for the parameter
>>
>> The advantage of the widget form is that it allows macro parameters to be 
>> specified as widget attributes
>> *parameters* Macro parameters specified as attributesThis includes
>> *$macrocall*
>> *ActionCreateTiddlerWidget*
>> *ActionDeleteFieldWidget*
>> *ActionSendMessageWidget*
>> *ActionSetFieldWidget*
>> *VarsWidget*
>>
>> Each of the above need to be able to have the the parameter name=value 
>> thus provide $name=parmval to stop a clash. They are all quite general in 
>> nature.
>>
>> It is actually very simple, Ask yourself in any given widget may you need 
>> to be able to set a value (Typically a field) of the same name as on of the 
>> documented parameters?
>>
>> Regards
>> Tony
>>
>> On Friday, February 22, 2019 at 1:50:53 AM UTC+11, Mohammad wrote:
>>>
>>> Unfortunately it is confusing
>>>
>>> <$wikify name= ...
>>> <$macrocall $name= ...
>>>
>>>
>>> I would recommend for widget, use widget parameter with $ and everything 
>>> else without it!
>>> But seems for backward compatibility there are very hard to revise!
>>>
>>> --Mohammad
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3f773468-8e79-46eb-b2f4-91961b26a2ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: syntax -- are "$"s important?

2019-02-21 Thread Mohammad
Hello Tony!
Thank you for clarification. I understood the reason!
But for simplicity I asked why not use $ also for wikify widget attributes! 
I mean this way it much more simple to learn
and it kind of semantic naming rule.

By the way I respect developer opinion!

I share my own experience, I have to keep tiddlywiki.com open all the time, 
because when coding (specially a little complex one) I mixed these things 
and
I had cases it took me hours to debug the code.

Cheers
Mohammad

On Friday, February 22, 2019 at 1:02:23 AM UTC+3:30, TonyM wrote:
>
> Mohammad,
>
> I may be confusing to you now but with respect it is not.
>
> In wikify you will never need to provide another parameter other than 
> defined in the the wikify macro
> AttributeDescription
> name The name of the variable to assign
> text The text to parse and render
> type The ContentType  of the text 
> (defaults to text/vnd.tiddlywiki)
> mode The parse mode: block (the default) or inline
> output Keyword indicating the desired output type, defaulting to text (see 
> below)
> However in The $macrocall widget you may very well want to define a field 
> called "name" and give it a value bvecaue you may have a field called name, 
> thus $name is used for the parameter
>
> The advantage of the widget form is that it allows macro parameters to be 
> specified as widget attributes
> *parameters* Macro parameters specified as attributesThis includes
> *$macrocall*
> *ActionCreateTiddlerWidget*
> *ActionDeleteFieldWidget*
> *ActionSendMessageWidget*
> *ActionSetFieldWidget*
> *VarsWidget*
>
> Each of the above need to be able to have the the parameter name=value 
> thus provide $name=parmval to stop a clash. They are all quite general in 
> nature.
>
> It is actually very simple, Ask yourself in any given widget may you need 
> to be able to set a value (Typically a field) of the same name as on of the 
> documented parameters?
>
> Regards
> Tony
>
> On Friday, February 22, 2019 at 1:50:53 AM UTC+11, Mohammad wrote:
>>
>> Unfortunately it is confusing
>>
>> <$wikify name= ...
>> <$macrocall $name= ...
>>
>>
>> I would recommend for widget, use widget parameter with $ and everything 
>> else without it!
>> But seems for backward compatibility there are very hard to revise!
>>
>> --Mohammad
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/8987736f-4c52-425c-a25a-7cdc05ad6064%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: syntax -- are "$"s important?

2019-02-21 Thread TonyM
Mohammad,

I may be confusing to you now but with respect it is not.

In wikify you will never need to provide another parameter other than 
defined in the the wikify macro
AttributeDescription
name The name of the variable to assign
text The text to parse and render
type The ContentType  of the text 
(defaults to text/vnd.tiddlywiki)
mode The parse mode: block (the default) or inline
output Keyword indicating the desired output type, defaulting to text (see 
below)
However in The $macrocall widget you may very well want to define a field 
called "name" and give it a value bvecaue you may have a field called name, 
thus $name is used for the parameter

The advantage of the widget form is that it allows macro parameters to be 
specified as widget attributes
*parameters* Macro parameters specified as attributesThis includes
*$macrocall*
*ActionCreateTiddlerWidget*
*ActionDeleteFieldWidget*
*ActionSendMessageWidget*
*ActionSetFieldWidget*
*VarsWidget*

Each of the above need to be able to have the the parameter name=value thus 
provide $name=parmval to stop a clash. They are all quite general in nature.

It is actually very simple, Ask yourself in any given widget may you need 
to be able to set a value (Typically a field) of the same name as on of the 
documented parameters?

Regards
Tony

On Friday, February 22, 2019 at 1:50:53 AM UTC+11, Mohammad wrote:
>
> Unfortunately it is confusing
>
> <$wikify name= ...
> <$macrocall $name= ...
>
>
> I would recommend for widget, use widget parameter with $ and everything 
> else without it!
> But seems for backward compatibility there are very hard to revise!
>
> --Mohammad
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5fbc0909-5ac2-49e4-9ece-9958d1c89485%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: syntax -- are "$"s important?

2019-02-21 Thread @TiddlyTweeter
Ciao Mohammad

That is a useful reply, because I can use it as a Rule I can understand 
simply. 

What confused me was seeing uses both with and without "$" that (mainly) 
worked. 

The problem comes in debugging code where you not sure if you made a logic 
problem or a syntax error.

Best wishes
Josiah

On Thursday, 21 February 2019 15:50:53 UTC+1, Mohammad wrote:
>
> Unfortunately it is confusing
>
> <$wikify name= ...
> <$macrocall $name= ...
>
>
> I would recommend for widget, use widget parameter with $ and everything 
> else without it!
> But seems for backward compatibility there are very hard to revise!
>
> --Mohammad
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a3c0b531-10e5-46b4-a3ff-0dc7dace4b4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: syntax -- are "$"s important?

2019-02-21 Thread Mohammad
Unfortunately it is confusing

<$wikify name= ...
<$macrocall $name= ...


I would recommend for widget, use widget parameter with $ and everything 
else without it!
But seems for backward compatibility there are very hard to revise!

--Mohammad

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c721bffe-14bc-42c8-af6e-91bea8a30da5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: syntax -- are "$"s important?

2019-02-20 Thread Joshua Fontany
Mahalo (thanks)

On Wednesday, February 20, 2019 at 1:23:54 PM UTC-8, TonyM wrote:
>
> Using $ as a prefix to a parameter name in widgets is only when there is a 
> posibility when you may want to pass a name value the same as the parameter.
>
> $value=v1 allows value=v2 to be used in the same widget. Effectively not 
> blocking you from passing a "value" called value
>
> This you find it in widgets that should permit any parameter=value pair 
> like creating tiddlers, and almost no where else.
>
> Tony
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/7e9ff0be-3c1e-4802-8e35-622da60a305a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: syntax -- are "$"s important?

2019-02-20 Thread Joshua Fontany
>From my understanding of the docs and poking around while building my Json 
plugin, I would say that yes, they are important.

I still find myself looking up almost every widget to see if I am using the 
right syntax.

The trend that I have seen is that parameters that start with $ are "named 
parameters", those that do not are collected into a 'paramObject' 
internally, and are "optional parameters". I'm not sure if this can be 
generalized exactly like that. but is how I think about them. This can 
be seen clearest in the <$action-setfield> widget. If you don't have 
$tiddler & $field it won't work ($value is optional). If you have $tiddler, 
but no $field or $value (etc), but you do have a set of optional 
parameters, such as  <$action-setfield $tiddler=<> 
name="the Name" date="the Date" location="the Location"> then those are 
interpreted as !!field = "value".
AttributeDescription
$tiddler The title of the tiddler whose fields are to be modified (if not 
provided defaults to the current tiddler 
)
$field Optional name of a field to be assigned the $value attribute
$index Optional index of a property in a data tiddler 
 to be assigned the $value attribute
$value The value to be assigned to the field or index identified by the 
$field or $index attribute. If neither is specified then the value is 
assigned to the text field. If no value is specified, $field or $index will 
be deleted.
$timestamp Specifies whether the timestamp(s) of the target tiddler will be 
updated (*modified* and *modifier*, plus *created* and *creator* for newly 
created tiddlers). Can be "yes" (the default) or "no"
*{any attributes not starting with $}* Each attribute name specifies a 
field to be modified with the attribute value providing the value to assign 
to the field


On Wednesday, February 20, 2019 at 8:36:25 AM UTC-8, @TiddlyTweeter wrote:
>
> I'm just starting to (vaguely) understand TW code...
> A problem is variations I see in used syntax ... especially about when you 
> use $ or not. I get confused.
>
> Is it ... ?
>
> <$link to="hobbit" ...
>
> or is it ... ?
>
> <$link $to="hobbit"...
>
> Is it ... ?
>
> <$action-sendmessage $message="tm-close-tiddler" 
> $param={{{[has[draft.of]field:draft.of]}}}/>
>
> or is it ... 
>
> <$action-sendmessage $message="tm-close-tiddler" 
> param={{{[has[draft.of]field:draft.of]}}}/>
>
> (Thanks to Thomas for that one: 
> https://groups.google.com/d/msg/tiddlywiki/tUwDeDPQyDc/ie4Zyhx8BQAJ)
>
> Just trying to get clearer
> Josiah
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/8db3dd3f-9553-4280-87ac-7cacff6ba505%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: syntax -- are "$"s important?

2019-02-20 Thread @TiddlyTweeter
repeat for email ...

On Wednesday, 20 February 2019 17:36:25 UTC+1, @TiddlyTweeter wrote:
>
> I'm just starting to (vaguely) understand TW code...
> A problem is variations I see in used syntax ... especially about when you 
> use $ or not. I get confused.
>
> Is it ... ?
>
> <$link to="hobbit" ...
>
> or is it ... ?
>
> <$link $to="hobbit"...
>
> Is it ... ?
>
> <$action-sendmessage $message="tm-close-tiddler" 
> $param={{{[has[draft.of]field:draft.of]}}}/>
>
> or is it ... 
>
> <$action-sendmessage $message="tm-close-tiddler" 
> param={{{[has[draft.of]field:draft.of]}}}/>
>
> (Thanks to Thomas for that one: 
> https://groups.google.com/d/msg/tiddlywiki/tUwDeDPQyDc/ie4Zyhx8BQAJ)
>
> Just trying to get clearer
> Josiah
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/39cb083e-7aa5-4b95-98ce-8d1a3b30a2fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.