> I think you're saying that style A is better than B
>
> where A is
>
> <$button actions = {{{Tiddler}}} > Text </$button>
>
> and B is
>
> <$button>
> Actions
> </$button>
That's right: when action widgets were first introduced there was only style B,
then we discovered some subtle evaluation order bugs, and so introduced style
A, which is immune to most of the problems.
I personally prefer a variant of style A where one uses a variable to store the
action widgets instead of a separate tiddler:
\define my-actions()
<$action-navigate $to="$:/ControlPanel"/>
<$action-setfield $tiddler="$:/SiteTitle" $value={{{
[{$:/SiteTitle}addsuffix[!]] }}}/>
\end
<$button actions=<<my-actions>>>
Click me to open control panel and add an exclamation mark to the site title
</$button>
Best wishes
Jeremy.
> To my eye A is better in the sense that less verbose = good
>
> It might be that B is better since you only have to read one tiddler code
> to understand what's going on and if you have no intention of reusing the
> action code it makes sense to put everything in one place.
>
> Is their a recommended best practise?
>
> Cheers
>
> /Joe
>
> Cheers
>
> /Joe
>
>
>
>
>
>
>
>> Enjoy
>> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/fb1e0e87-f79b-45e5-bf50-18520723950a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
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 [email protected].
To post to this group, send email to [email protected].
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/B5F88D7A-8B9F-456C-A74A-172615125A67%40gmail.com.
For more options, visit https://groups.google.com/d/optout.