PMario

What I want to do is build a macro that will evaluate and return the 
results of an expression such as {{!!fieldname}} within the current 
context. That would solve so many of my macro problems. I've wasted too 
many days working out the context differences between <<variableName>>, 
$variableName$, $(variableName)$, <$macrocall $name="variableName"> etc. 
etc. etc. Because macro strings are not evaluated within the macro, only 
after they have been returned into the calling tiddler context.

Here's the actual use case:
We are migrating data from one application to another

1. I have a type="application/json" tiddler containing name/value pairs 
where name translates into value. It is tagged "xlate"
2. I have 2 fields in that tiddler from = "sourcetablename" and to = 
"targettablename"
3. I have 2 other tiddlers "sourcetablename" and "targettablename" (for 
example except I have 100+ tables) 
.   a. The sourcetablename tiddler has a list field listing the target 
tables into which the data is going to be moved
.   b. The targettablename tiddler has a set of fields (select, from, 
where, orderby, screenname) that list the fields that are being displayed 
on the screen
4. I have a viewtemplate that constructs a set of sql statements that are 
going to allow an analyst to query the source tables, query the target 
tables, look at the screens and make sure that the data has been migrated 
correctly

Yay. That works. Total pain to make work but it works and its saving me 
tons of pain managing a thousand or so test cases

Now I want to display that same text in another tiddler and all of the 
macro statements I worked so hard to develop for the one use case don't 
work in this new context because 




*the snippets are not parsed as WikiText 
<http://tiddlywiki.com/prerelease/index.html#WikiText>. Instead they are 
returned unevaluated through the macro tree and only evaluated in the 
calling context.And you can't have a statement <$macrocall 
$name="macroname" variablename="<$macrocall $name="anothermacro"/>" />I 
think there's a whole github discussion about this.*

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/70ed0348-9051-40d3-83da-cbb893c01289%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to