Thanks Eric, will give this a try. In an earlier version, I did use the $(..)$ 
format and then for a reason I can't explain, replaced it by the <<..>> format 
after reading various manual pages.

BobJ

---------------
Dr Bob Jansen
The Cultural Conversations project 
Turtle Lane Studios Pty Ltd trading as the Australian Centre for Oral History
122 Cameron St, Rockdale NSW 2216, Australia 
Ph (Korea): +82 10-4494-0328 
Ph (Australia) +61 414 297 448 
Resume: http://au.linkedin.com/in/bobjan 
Skype: bobjtls 
KakaoTalk: bobjtls 
http://www.cultconv.com 

 In line with the Australian anti-spam legislation, if you wish to receive no 
further email from me, please send me an email with the subject "No Spam"

> On 11 Sep 2020, at 22:56, Eric Shulman <[email protected]> wrote:
> 
>> On Friday, September 11, 2020 at 4:14:44 AM UTC-7, Bob Jansen wrote:
>> The task is to create a tiddler storing in a field a string, for example, 
>> ArtworkImages/BJ007.jpg, where the number is an incremental number and the 
>> text comes from various tiddlers, eg. $:/TLS/imagefoldername,  so it can be 
>> altered as required..
>> The problem is passing the values of artwork_url and artwork_id into the new 
>> tiddler.
>> The values stored are: artwork_id is <<idcode>><<incremental>> and 
>> artwork_url is <<foldername>><<idcode>><<incremental>><<imagecode>> instead 
>> of their values.
>> However, displaying the values of the variables  for debugging purposes 
>> gives: ...
>> These values are as they should be but they are not carried across into the 
>> action-createtiddler widget. 
>> 
>  
> Macros do ONLY two kinds of processing:
> 1) Replace any instances of $arg$ passed in
> 2) Replace any instances of $(variable)$ that are defined *outside* the macro
> 
> Everything else contained inside a macro is returned exactly as defined 
> within the macro.  It is up to the "calling context" to process the returned 
> macro content.
> 
> When you write:
> \define artworkurl() <<foldername>><<idcode>><<incremental>><<imagecode>>
> \define uniqueid() <<idcode>><<incremental>>
> The results are to simply return the macro's contents as shown.  The 
> variables references inside the macros are not automatically converted to 
> their values.
> 
> If you then *display* the results of the macro, the "<<variablename>>" syntax 
> is automatically "wikified" to render the value stored in the variable.
> However, when you use the results of the macro as a *parameter* in a $widget, 
> the macro results are passed to the $widget "as-is" without further 
> processing.
> 
> The easiest way to make your code work (assuming no other problems) is to 
> change these two macros, like this:
> \define artworkurl() $(foldername)$$(idcode)$$(incremental)$$(imagecode)$
> \define uniqueid() $(idcode)$$(incremental)$
> By doing this, the content returned from those macros WILL be the *values* of 
> the variables, not the references to the variables.
> 
> -e
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "TiddlyWiki" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/tiddlywiki/uWum4aFZPmc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/23da8137-8fd3-4df6-bcd6-38040bee6544o%40googlegroups.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/6D029C88-815A-4EA1-83B3-C0918BCD183D%40gmail.com.

Reply via email to