Nested macro call not working

242 views
Skip to first unread message

Danielo Rodríguez

unread,
Apr 1, 2015, 10:55:26 AM4/1/15
to tiddl...@googlegroups.com
This alwasy gets hard for me.

I'm trying to create new tiddlers, with consecutive names without opening them for editing. To do so I'm using the setfield widget.
Here is my approach that is not working. It only renders the button with the widget declaration as text.

Any idea?


\define colnumber()
<$count filter="[tag[Column]]"/>
\end

\define colname(number)
<$button>+
<$action-setfield $tiddler="column$number$" tags="Column"/>
</$button>
\end 


<$macrocall $name="colname" number=<<colnumber>>/>


<$list filter="[tag[Column]]">
<$edit-text tiddler={{!!title}}/>
</$list>


Jeremy Ruston

unread,
Apr 1, 2015, 1:12:41 PM4/1/15
to TiddlyWiki
Hi Danielo

I'm afraid that the issue is one that's come up before: transcluded macro invocations used as an attribute of a widget are not wikified before use; the attribute ends up with the raw text of the macro (after the textual substitutions). There's no workaround at the moment.

There was a recent discussion on GitHub about possible fixes, but I can't find it right now - Felix, I think you were involved in that discussion?

Best wishes

Jeremy.



--
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+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/eb256508-eb80-46fe-82dd-ed75de053a74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Felix Küppers

unread,
Apr 1, 2015, 1:32:38 PM4/1/15
to tiddl...@googlegroups.com
Hi Jeremy,

The github search is really bad. But here it is the topic you were referring to:

https://github.com/Jermolene/TiddlyWiki5/issues/1339

-Felix

Jeremy Ruston

unread,
Apr 1, 2015, 2:01:17 PM4/1/15
to TiddlyWiki
Thanks Felix!

Best wishes

Jeremy.



For more options, visit https://groups.google.com/d/optout.

Danielo Rodríguez

unread,
Apr 2, 2015, 4:29:57 AM4/2/15
to tiddl...@googlegroups.com
Hello everyone,

Thank you for the information, but that doesn't help me much. Could anyone propose an alternative solution? Anything that works would be ok for me. I just want to add new tiddlers without having them be displayed.

I also tried this, but it did not work neither:

\define colname()
column<$count filter="[tag[Column]]"/>
\end

<$button>+
<$action-setfield $tiddler=<<colname>> tags="Column"/>
</$button>


Jeremy Ruston

unread,
Apr 2, 2015, 4:35:21 AM4/2/15
to TiddlyWiki
Hi Danielo

On Thu, Apr 2, 2015 at 9:29 AM, Danielo Rodríguez <rdan...@gmail.com> wrote:
Could anyone propose an alternative solution? Anything that works would be ok for me. I just want to add new tiddlers without having them be displayed.

One approach that could work is to write a tiny JavaScript macro to implement <<colname>>.

Best wishes

Jeremy
 

I also tried this, but it did not work neither:

\define colname()
column<$count filter="[tag[Column]]"/>
\end

<$button>+
<$action-setfield $tiddler=<<colname>> tags="Column"/>
</$button>


--
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+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages