Hi Folks,
I'm trying to populate a stylesheet, but I'm having trouble getting these
macros to work together. The concatStateTiddler macro is supposed to give
me the name of a state tiddler tacked composed of a prefix and the name of
the currentTiddler. The backup macro is supposed to fetch some value from
the state tiddler if it is present. And if it is not present, it should
fetch it from a set of backup values.
\define concatStateTiddler()
<$set filter="[all[current]get[draft.of]] [all[current]!has[draft.of]]">
"$:/state/<<currentTiddler>>"
</$set>
\end
\define backup(value)
<$view tiddler=$(concatStateTiddler)$ field="""$value$""">
<$view tiddler="$:/config/backup-values" field="""backup-$value$""">
</$view>
</$view>
\end
I can get it to work if concatStateTiddler looks like this:
\define concatStateTiddler()
"$:/state/$(currentTiddler)$"
\end
But I want the view and edit mode versions of the tiddler to use the same
state tiddler. Hence the first version of concatStateTiddler. But the first
version doesn't play nice with the backup macro. Any ideas of what I'm
doing wrong here?
The only thing I can think is that the set widget is creating a list, even
if it is a list consisting of only one element (on account of the use of
[all[current]]). That list format may be playing havoc with the backup
macro. But I really don't have any idea beyond that. Any help would be
greatly appreciated.
Best regards,
Adam
--
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/50e6d96a-ab1d-4597-905c-3b7e7334246b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.