Adam, I do not understand the Question, Others may, However in your set statement you are not providing or using the name= parameter so I am not sure what is happening other than in your second example.
Regards Tony On Wednesday, February 13, 2019 at 11:58:14 AM UTC+11, admls wrote: > > 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/254a929f-7304-4d06-9a9d-74847181bde0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

