Thank you c pa!
The problem with this attempt is that *sort-field* is assigned to *in* 
TableHeaders(). This can't be done elsewhere because of *currentField* 
being rendered inside TableHeaders. Or am I wrong?

 I think, I misunderstand some basic concept about the variable assignment:

\define TableHeaders()
<$list filter="[is[current]split:table-headers[,]]" variable="currentField"
><th><$button class="tc-btn-invisible" set="!!sort-field" 
>setTo=<<lowerSortField 
text="<<currentField>>">> ><<currentField>></$button></th></$list>
\end

\define lower(text)
@@text-transform: lowercase;$text$@@ 
\end

\define lowerSortField(text)
<<lower $text$>>
\end


I want lowerSortField() to return the evaluated string. With the code above 
I get *true. *Perhaps my macro-nesting is defective?

When I try to transmit the <<currentField>> in a way similar to c pa's 
proposition by wrapping it in a setWidget, i.e.
\define TableHeaders()
<$list filter="[is[current]split:table-headers[,]]" variable="currentField"
><th><$set name="currentFieldSet" value=<<currentField>> ><$button class=
"tc-btn-invisible" set="!!sort-field" setTo=<<lowerSortField>> ><<
currentField>></$button></$set></th></$list>
\end

\define lower(text)
@@text-transform: lowercase;$text$@@ 
\end

\define lowerSortField()
<<lower $(currentFieldSet)$>>
\end

I get *<<lower a>> *where *a* is the the *currentField* value. 

I'll be much obliged for any further help.

jim

Am Freitag, 12. September 2014 17:09:07 UTC+2 schrieb c pa:
>
> >> In the end the sort-field field of the tiddler should contain the 
> <<currentField>> in lower case. 
> To do that you need to convert <<currentField>> to lower case before 
> calling the <<TableHeaders>> macro
> So you need a macro that does the conversion then calls <<TableHeaders>> 
> Something like the following: 
> \define lowerTableHeaders()
> <$set name="sort-field" setTo=<<lower $(currentField)gt;> >
> <<TableHeaders>>
> </$set>
>
> \end
>

-- 
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to