Would it be true that
\define tv-action-refresh-policy() always
can now always be transformed into
\procedure tv-action-refresh-policy() always
without an problem? I think so but let the experts speak!
Would it be true that
\define tv-action-refresh-policy() always
can now always be transformed into
\procedure tv-action-refresh-policy() always
without an problem? I think so but let the experts speak!
I am confident it is, because they all ultimately set a variable. I make no claims of expertise, but have a high level of confidence.
Yes there is no difference.
I did have a closer look to the code. The tv-action-refresh-policy
variable is checked only once by the .invokeActions()
function in widget.js
The value will not be processed any further. It expects a string always
or once
(which is the default).
See: ActionWidget Execution Modes docs
Thank you for your advice and this extra information. A real life example in the taller would help to understand how useful it really is. At least, a real life scenario. To get a trigger alert in your head when you should think about that trick!
For such “simple” variable definitions, the point is: There is no difference.
The widget-tree created is absolutely the same thing for both pragmas.
As you can see in the screenshots, the widget-tree creates a set-widget, that defines the name and the value.
Important:
Only if parameters, variable and text substitutions are used it makes a big difference and procedures should be used now.