Thanks Eric,

don't mind for my head, it was spinning long before your explanation ;^)))

What can I say? Uh! Stupid me, it's obvious. After it's always easier. I 
will change my code and will use the trick you suggested. I had something 
similar in my spinning mind, but I don't like workarounds without a valid 
reason to be applied. Now I realize that your way is not just a workaround, 
since the resulting code is cleaner than my generic strings concat macro.

Otherwise I don't want to lose the chance to learn something, so I fall 
back to the title of this thread. Searching for a way to use str macro I 
ended up with this (in this example <<r>> stands in place od 
<<currentTiddler>>:

<$set name=v value=<<str """<$transclude tiddler=<$1$> index=<$2$> />""" """
<r>""" """<i>""">> >
<<v>>
</$set>

This code, included in the two nested list widget, displays the expected 
values (yes, I know, three nested macro calls are really an ugly 
workaround, I'm just investigating tw syntax secrets). This was the 
alternative I found  to something like:

{{<<r>>!!<<i>>}}

The first question is simply: is there a particular reason for the 
variables to be not working inside curly brackets?

The second one requires to consider the following code:

<!------------
-- Table rows
-->
<$list filter="""[tag<t>sort[sort]]""" variable="r">
<tr>
<$list filter="""[<t>indexes[]]""" variable="i">
<$set name=v value=<<str """<$transclude tiddler=<$1$> index=<$2$> />""" 
"""<r>""" """<i>""">> >
<$set name=s value=<<str """<$transclude tiddler=<$1$> field=<$2$> />""" 
"""<r>""" """<i>""">> >
<td>
<!--------------------
-- View mode field
-->
<$reveal state=<<s>> type="nomatch" text="edit">
<$button class="tc-btn-invisible tc-tiddlylink" set=<<s>> setTo="edit">
<<v>>
</$button>
</$reveal>
<!-----------------
-- Edit mode field
-->
<$reveal state=<<s>> type="match" text="edit">
<$edit-text tiddler=<<r>> index=<<i>> tag="input" size=10/>
<$button class="tc-btn-invisible" set=<<s>> setTo="view">
<small>{{$:/core/images/close-button}}</small>
</$button>
</$reveal>
</td>
</$set>
</$set>
</$list>

I intended to use a field, with the same name of the index, as state 
tiddler for the reaveal widget that allows to switch between edit or view 
mode for any single cell in the table. But I found that a tiddler with 
title "<$transclude tiddler=<<r>> field=<<i>> />" has been created.

Now it's my turn to be worried about your headache.

-- 
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/9bfbaaad-30a5-442d-9b93-b94398eb8bcd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to