Re: [tw5] Re: Curious behavior

2021-05-11 Thread TW Tones
History Buff,

Good to hear you made progress. 

One guess on repeated outputs is there is a loop somewhere doing it, again 
without looking at your code, muy guess may be that your code  {{ 
[titleget[archive]] }}} is inside a list that has more than one 
result when you think it only has one. Even just use the +[limit[1]] to see 
if that helps you identify the list generating multiple outputs by stopping 
it. AL;so, This sometimes occurs when a filter does not start with 
[all[current]... to ensure it only applies here, on the current tiddler, 
then it finds all tiddlers that match.

Regards
Tones


On Wednesday, 12 May 2021 at 02:27:25 UTC+10 History Buff wrote:

> Hey Tones,
>
> After sleeping on it, I realized the wisdom of your helpful tips. I used 
> the addprefix operator to great advantage.
>
> I replaced the following: 
> archive={{{ [titleget[archive]] }}}
>
> with:
> archive={{{ [titleget[archive]addprefix[.\Archival_images\]] }}}
>
> I also removed the second wikify statement. This did just exactly what I 
> needed it to do. Thanks for the tips. It was a bit too subtle for my sleepy 
> mind last night.
>
> I still don't understand why the other method was doing what it was doing 
> with the repeated string. If anyone can explain that to me, I would greatly 
> appreciate it.
> On Monday, May 10, 2021 at 9:26:55 PM UTC-7 History Buff wrote:
>
>> No harm, no foul. I appreciate the tips as always. 
>>
>> Any thoughts on the code?
>>
>>
>> On Mon, May 10, 2021 at 8:48 PM TW Tones  wrote:
>>
>>> Concatenate (at the end) is "adding a suffix almost by definition". I 
>>> call it a suffix in this case because it clearly only comes at the end. and 
>>> using the suffix operators is a way to concatenate.
>>>
>>> Please not I did not review the code you presented, just thought these 
>>> tips may help.
>>>
>>> Regards
>>> Tones
>>>
>>>
>>> On Tuesday, 11 May 2021 at 13:31:22 UTC+10 History Buff wrote:
>>>
 Thanks Tones,

 I’ve used limit in the past so am familiar with it. However, I’m not 
 understanding how it applies here. I’m not adding the filename as a suffix 
 in a filter (unless I’m really missing something which may be the case). 
 I’m using a small macro to concatenate the path with the filename. 


 On Mon, May 10, 2021 at 8:19 PM TW Tones  wrote:

> That result is common when your list is generating more instances that 
> you expected.
>
> It suggest an error in your code. A Quick fix may be to introduce 
> +[limit[1]] in the filter generating it.
> In this case we can see the problem is before adding the suffix 
> image.jpg
>
> Tones
>
> On Tuesday, 11 May 2021 at 11:21:08 UTC+10 History Buff wrote:
>
>> Sorry, I attempted to describe it in words which wasn't sufficient.
>>
>> What I want to result is the following (assume the filename is 
>> image.jpg):
>>
>> ./Archival_image/image.jpg
>>
>> What I actually get is this:
>>
>>
>> ./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/image.jpg
>>
>> The number of times ./Archival_image/ is repeated seems random and, 
>> as I said, can be as many as two or three all the way up to eighteen.
>>
>>
>> On Monday, May 10, 2021 at 5:51:00 PM UTC-7 TW Tones wrote:
>>
>>> Do share an example of the "corrupt values", if could point to the 
>>> problem without jumping into the code, or will this code work on 
>>> tiddlywiki.com, if not can you make it?
>>>
>>> Tones
>>>
>>> On Tuesday, 11 May 2021 at 06:58:28 UTC+10 History Buff wrote:
>>>
 All,

 I have a macro that has several edit text widgets and a button to 
 save these inputs to the fields of a newly created tiddler (see code 
 below). I'm having some issues with one particular field, namely the 
 archive field. The input is the filename of the image and what should 
 be 
 placed in the archive field of the new tiddler is: 
 ./Archival_images/filename. However, what ends up being placed in 
 there is 
 the ./Archival_images/ string repeated a seemingly random number of 
 times. 
 I've seen it repeated anywhere from three times to eighteen times. 
 I've 
 tried slashes with both directions with no difference. I've also tried 
 the 
 wikify widget without the output and mode options with no difference 
 in 
 behavior. Any ideas on why that might be happening?

 Thanks in advance.


 \define newtext(image)
>>> src="./Images/$image$.webp">
 \end

 \define newarchive(archive)
   ./Archival_images/$archive$
 \end

 \define newImageEntry()
   <$vars
 

Re: [tw5] Re: Curious behavior

2021-05-11 Thread History Buff
Hey Tones,

After sleeping on it, I realized the wisdom of your helpful tips. I used 
the addprefix operator to great advantage.

I replaced the following: 
archive={{{ [titleget[archive]] }}}

with:
archive={{{ [titleget[archive]addprefix[.\Archival_images\]] }}}

I also removed the second wikify statement. This did just exactly what I 
needed it to do. Thanks for the tips. It was a bit too subtle for my sleepy 
mind last night.

I still don't understand why the other method was doing what it was doing 
with the repeated string. If anyone can explain that to me, I would greatly 
appreciate it.
On Monday, May 10, 2021 at 9:26:55 PM UTC-7 History Buff wrote:

> No harm, no foul. I appreciate the tips as always. 
>
> Any thoughts on the code?
>
>
> On Mon, May 10, 2021 at 8:48 PM TW Tones  wrote:
>
>> Concatenate (at the end) is "adding a suffix almost by definition". I 
>> call it a suffix in this case because it clearly only comes at the end. and 
>> using the suffix operators is a way to concatenate.
>>
>> Please not I did not review the code you presented, just thought these 
>> tips may help.
>>
>> Regards
>> Tones
>>
>>
>> On Tuesday, 11 May 2021 at 13:31:22 UTC+10 History Buff wrote:
>>
>>> Thanks Tones,
>>>
>>> I’ve used limit in the past so am familiar with it. However, I’m not 
>>> understanding how it applies here. I’m not adding the filename as a suffix 
>>> in a filter (unless I’m really missing something which may be the case). 
>>> I’m using a small macro to concatenate the path with the filename. 
>>>
>>>
>>> On Mon, May 10, 2021 at 8:19 PM TW Tones  wrote:
>>>
 That result is common when your list is generating more instances that 
 you expected.

 It suggest an error in your code. A Quick fix may be to introduce 
 +[limit[1]] in the filter generating it.
 In this case we can see the problem is before adding the suffix 
 image.jpg

 Tones

 On Tuesday, 11 May 2021 at 11:21:08 UTC+10 History Buff wrote:

> Sorry, I attempted to describe it in words which wasn't sufficient.
>
> What I want to result is the following (assume the filename is 
> image.jpg):
>
> ./Archival_image/image.jpg
>
> What I actually get is this:
>
>
> ./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/image.jpg
>
> The number of times ./Archival_image/ is repeated seems random and, as 
> I said, can be as many as two or three all the way up to eighteen.
>
>
> On Monday, May 10, 2021 at 5:51:00 PM UTC-7 TW Tones wrote:
>
>> Do share an example of the "corrupt values", if could point to the 
>> problem without jumping into the code, or will this code work on 
>> tiddlywiki.com, if not can you make it?
>>
>> Tones
>>
>> On Tuesday, 11 May 2021 at 06:58:28 UTC+10 History Buff wrote:
>>
>>> All,
>>>
>>> I have a macro that has several edit text widgets and a button to 
>>> save these inputs to the fields of a newly created tiddler (see code 
>>> below). I'm having some issues with one particular field, namely the 
>>> archive field. The input is the filename of the image and what should 
>>> be 
>>> placed in the archive field of the new tiddler is: 
>>> ./Archival_images/filename. However, what ends up being placed in there 
>>> is 
>>> the ./Archival_images/ string repeated a seemingly random number of 
>>> times. 
>>> I've seen it repeated anywhere from three times to eighteen times. I've 
>>> tried slashes with both directions with no difference. I've also tried 
>>> the 
>>> wikify widget without the output and mode options with no difference in 
>>> behavior. Any ideas on why that might be happening?
>>>
>>> Thanks in advance.
>>>
>>>
>>> \define newtext(image)
>>>>> src="./Images/$image$.webp">
>>> \end
>>>
>>> \define newarchive(archive)
>>>   ./Archival_images/$archive$
>>> \end
>>>
>>> \define newImageEntry()
>>>   <$vars
>>> temp="$:/temp/NewImageEntry">
>>> Image Filename:
>>>   <$edit-text
>>> tiddler=<>
>>> field=filename
>>> tag=input
>>> class=fieldinput
>>> size=64
>>>   />
>>> 
>>> Archival Image Filename:
>>>   <$edit-text
>>> tiddler=<>
>>> field=archive
>>> tag=input
>>> class=fieldinput
>>> size=64
>>>   />
>>> 
>>> Image Category:
>>>   <$edit-text
>>> tiddler=<>
>>> field=category
>>> tag=input
>>> class=fieldinput
>>> size=64
>>> placeholder="Enter all categories separated by a comma."
>>>   />
>>> 
>>> Image Label:
>>>   <$edit-text
>>> 

Re: [tw5] Re: Curious behavior

2021-05-10 Thread Damon Pritchett
No harm, no foul. I appreciate the tips as always.

Any thoughts on the code?


On Mon, May 10, 2021 at 8:48 PM TW Tones  wrote:

> Concatenate (at the end) is "adding a suffix almost by definition". I call
> it a suffix in this case because it clearly only comes at the end. and
> using the suffix operators is a way to concatenate.
>
> Please not I did not review the code you presented, just thought these
> tips may help.
>
> Regards
> Tones
>
>
> On Tuesday, 11 May 2021 at 13:31:22 UTC+10 History Buff wrote:
>
>> Thanks Tones,
>>
>> I’ve used limit in the past so am familiar with it. However, I’m not
>> understanding how it applies here. I’m not adding the filename as a suffix
>> in a filter (unless I’m really missing something which may be the case).
>> I’m using a small macro to concatenate the path with the filename.
>>
>>
>> On Mon, May 10, 2021 at 8:19 PM TW Tones  wrote:
>>
>>> That result is common when your list is generating more instances that
>>> you expected.
>>>
>>> It suggest an error in your code. A Quick fix may be to introduce
>>> +[limit[1]] in the filter generating it.
>>> In this case we can see the problem is before adding the suffix image.jpg
>>>
>>> Tones
>>>
>>> On Tuesday, 11 May 2021 at 11:21:08 UTC+10 History Buff wrote:
>>>
 Sorry, I attempted to describe it in words which wasn't sufficient.

 What I want to result is the following (assume the filename is
 image.jpg):

 ./Archival_image/image.jpg

 What I actually get is this:


 ./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/image.jpg

 The number of times ./Archival_image/ is repeated seems random and, as
 I said, can be as many as two or three all the way up to eighteen.


 On Monday, May 10, 2021 at 5:51:00 PM UTC-7 TW Tones wrote:

> Do share an example of the "corrupt values", if could point to the
> problem without jumping into the code, or will this code work on
> tiddlywiki.com, if not can you make it?
>
> Tones
>
> On Tuesday, 11 May 2021 at 06:58:28 UTC+10 History Buff wrote:
>
>> All,
>>
>> I have a macro that has several edit text widgets and a button to
>> save these inputs to the fields of a newly created tiddler (see code
>> below). I'm having some issues with one particular field, namely the
>> archive field. The input is the filename of the image and what should be
>> placed in the archive field of the new tiddler is:
>> ./Archival_images/filename. However, what ends up being placed in there 
>> is
>> the ./Archival_images/ string repeated a seemingly random number of 
>> times.
>> I've seen it repeated anywhere from three times to eighteen times. I've
>> tried slashes with both directions with no difference. I've also tried 
>> the
>> wikify widget without the output and mode options with no difference in
>> behavior. Any ideas on why that might be happening?
>>
>> Thanks in advance.
>>
>>
>> \define newtext(image)
>>> src="./Images/$image$.webp">
>> \end
>>
>> \define newarchive(archive)
>>   ./Archival_images/$archive$
>> \end
>>
>> \define newImageEntry()
>>   <$vars
>> temp="$:/temp/NewImageEntry">
>> Image Filename:
>>   <$edit-text
>> tiddler=<>
>> field=filename
>> tag=input
>> class=fieldinput
>> size=64
>>   />
>> 
>> Archival Image Filename:
>>   <$edit-text
>> tiddler=<>
>> field=archive
>> tag=input
>> class=fieldinput
>> size=64
>>   />
>> 
>> Image Category:
>>   <$edit-text
>> tiddler=<>
>> field=category
>> tag=input
>> class=fieldinput
>> size=64
>> placeholder="Enter all categories separated by a comma."
>>   />
>> 
>> Image Label:
>>   <$edit-text
>> tiddler=<>
>> field=label
>> class=fieldinput
>> tag=input
>> placeholder="Enter a brief label for the image."
>> size=64
>>   />
>> 
>> Image Details:
>>   <$edit-text
>> tiddler=<>
>> field=details
>> class=fieldarea
>> tag=textarea
>> placeholder="Enter any detailed information about the image."
>>   />
>> 
>> Surnames:
>>   <$edit-text
>> tiddler=<>
>> field=surnames
>> tag=input
>> class=fieldinput
>> size=64
>> placeholder="Enter all surnames separated by a comma."
>>   />
>> 
>> <$button tooltip="save input">
>> 

Re: [tw5] Re: Curious behavior

2021-05-10 Thread TW Tones
Concatenate (at the end) is "adding a suffix almost by definition". I call 
it a suffix in this case because it clearly only comes at the end. and 
using the suffix operators is a way to concatenate.

Please not I did not review the code you presented, just thought these tips 
may help.

Regards
Tones


On Tuesday, 11 May 2021 at 13:31:22 UTC+10 History Buff wrote:

> Thanks Tones,
>
> I’ve used limit in the past so am familiar with it. However, I’m not 
> understanding how it applies here. I’m not adding the filename as a suffix 
> in a filter (unless I’m really missing something which may be the case). 
> I’m using a small macro to concatenate the path with the filename. 
>
>
> On Mon, May 10, 2021 at 8:19 PM TW Tones  wrote:
>
>> That result is common when your list is generating more instances that 
>> you expected.
>>
>> It suggest an error in your code. A Quick fix may be to introduce 
>> +[limit[1]] in the filter generating it.
>> In this case we can see the problem is before adding the suffix image.jpg
>>
>> Tones
>>
>> On Tuesday, 11 May 2021 at 11:21:08 UTC+10 History Buff wrote:
>>
>>> Sorry, I attempted to describe it in words which wasn't sufficient.
>>>
>>> What I want to result is the following (assume the filename is 
>>> image.jpg):
>>>
>>> ./Archival_image/image.jpg
>>>
>>> What I actually get is this:
>>>
>>>
>>> ./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/image.jpg
>>>
>>> The number of times ./Archival_image/ is repeated seems random and, as I 
>>> said, can be as many as two or three all the way up to eighteen.
>>>
>>>
>>> On Monday, May 10, 2021 at 5:51:00 PM UTC-7 TW Tones wrote:
>>>
 Do share an example of the "corrupt values", if could point to the 
 problem without jumping into the code, or will this code work on 
 tiddlywiki.com, if not can you make it?

 Tones

 On Tuesday, 11 May 2021 at 06:58:28 UTC+10 History Buff wrote:

> All,
>
> I have a macro that has several edit text widgets and a button to save 
> these inputs to the fields of a newly created tiddler (see code below). 
> I'm 
> having some issues with one particular field, namely the archive field. 
> The 
> input is the filename of the image and what should be placed in the 
> archive 
> field of the new tiddler is: ./Archival_images/filename. However, what 
> ends 
> up being placed in there is the ./Archival_images/ string repeated a 
> seemingly random number of times. I've seen it repeated anywhere from 
> three 
> times to eighteen times. I've tried slashes with both directions with no 
> difference. I've also tried the wikify widget without the output and mode 
> options with no difference in behavior. Any ideas on why that might be 
> happening?
>
> Thanks in advance.
>
>
> \define newtext(image)
> src="./Images/$image$.webp">
> \end
>
> \define newarchive(archive)
>   ./Archival_images/$archive$
> \end
>
> \define newImageEntry()
>   <$vars
> temp="$:/temp/NewImageEntry">
> Image Filename:
>   <$edit-text
> tiddler=<>
> field=filename
> tag=input
> class=fieldinput
> size=64
>   />
> 
> Archival Image Filename:
>   <$edit-text
> tiddler=<>
> field=archive
> tag=input
> class=fieldinput
> size=64
>   />
> 
> Image Category:
>   <$edit-text
> tiddler=<>
> field=category
> tag=input
> class=fieldinput
> size=64
> placeholder="Enter all categories separated by a comma."
>   />
> 
> Image Label:
>   <$edit-text
> tiddler=<>
> field=label
> class=fieldinput
> tag=input
> placeholder="Enter a brief label for the image."
> size=64
>   />
> 
> Image Details:
>   <$edit-text
> tiddler=<>
> field=details
> class=fieldarea
> tag=textarea
> placeholder="Enter any detailed information about the image."
>   />
> 
> Surnames:
>   <$edit-text
> tiddler=<>
> field=surnames
> tag=input
> class=fieldinput
> size=64
> placeholder="Enter all surnames separated by a comma."
>   />
> 
> <$button tooltip="save input"> 
> {{$:/images/google-material-design/image/two-tone/24px/add-a-photo}} Add 
> New Image
>   <$vars
> filename={{{ [titleget[filename]] }}}
> archive={{{ [titleget[archive]] }}}
> category={{{ [titleget[category]] }}}
> label={{{ 

Re: [tw5] Re: Curious behavior

2021-05-10 Thread Damon Pritchett
Thanks Tones,

I’ve used limit in the past so am familiar with it. However, I’m not
understanding how it applies here. I’m not adding the filename as a suffix
in a filter (unless I’m really missing something which may be the case).
I’m using a small macro to concatenate the path with the filename.


On Mon, May 10, 2021 at 8:19 PM TW Tones  wrote:

> That result is common when your list is generating more instances that you
> expected.
>
> It suggest an error in your code. A Quick fix may be to introduce
> +[limit[1]] in the filter generating it.
> In this case we can see the problem is before adding the suffix image.jpg
>
> Tones
>
> On Tuesday, 11 May 2021 at 11:21:08 UTC+10 History Buff wrote:
>
>> Sorry, I attempted to describe it in words which wasn't sufficient.
>>
>> What I want to result is the following (assume the filename is image.jpg):
>>
>> ./Archival_image/image.jpg
>>
>> What I actually get is this:
>>
>>
>> ./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/image.jpg
>>
>> The number of times ./Archival_image/ is repeated seems random and, as I
>> said, can be as many as two or three all the way up to eighteen.
>>
>>
>> On Monday, May 10, 2021 at 5:51:00 PM UTC-7 TW Tones wrote:
>>
>>> Do share an example of the "corrupt values", if could point to the
>>> problem without jumping into the code, or will this code work on
>>> tiddlywiki.com, if not can you make it?
>>>
>>> Tones
>>>
>>> On Tuesday, 11 May 2021 at 06:58:28 UTC+10 History Buff wrote:
>>>
 All,

 I have a macro that has several edit text widgets and a button to save
 these inputs to the fields of a newly created tiddler (see code below). I'm
 having some issues with one particular field, namely the archive field. The
 input is the filename of the image and what should be placed in the archive
 field of the new tiddler is: ./Archival_images/filename. However, what ends
 up being placed in there is the ./Archival_images/ string repeated a
 seemingly random number of times. I've seen it repeated anywhere from three
 times to eighteen times. I've tried slashes with both directions with no
 difference. I've also tried the wikify widget without the output and mode
 options with no difference in behavior. Any ideas on why that might be
 happening?

 Thanks in advance.


 \define newtext(image)
>>> src="./Images/$image$.webp">
 \end

 \define newarchive(archive)
   ./Archival_images/$archive$
 \end

 \define newImageEntry()
   <$vars
 temp="$:/temp/NewImageEntry">
 Image Filename:
   <$edit-text
 tiddler=<>
 field=filename
 tag=input
 class=fieldinput
 size=64
   />
 
 Archival Image Filename:
   <$edit-text
 tiddler=<>
 field=archive
 tag=input
 class=fieldinput
 size=64
   />
 
 Image Category:
   <$edit-text
 tiddler=<>
 field=category
 tag=input
 class=fieldinput
 size=64
 placeholder="Enter all categories separated by a comma."
   />
 
 Image Label:
   <$edit-text
 tiddler=<>
 field=label
 class=fieldinput
 tag=input
 placeholder="Enter a brief label for the image."
 size=64
   />
 
 Image Details:
   <$edit-text
 tiddler=<>
 field=details
 class=fieldarea
 tag=textarea
 placeholder="Enter any detailed information about the image."
   />
 
 Surnames:
   <$edit-text
 tiddler=<>
 field=surnames
 tag=input
 class=fieldinput
 size=64
 placeholder="Enter all surnames separated by a comma."
   />
 
 <$button tooltip="save input">
 {{$:/images/google-material-design/image/two-tone/24px/add-a-photo}} Add
 New Image
   <$vars
 filename={{{ [titleget[filename]] }}}
 archive={{{ [titleget[archive]] }}}
 category={{{ [titleget[category]] }}}
 label={{{ [titleget[label]] }}}
 details={{{ [titleget[details]] }}}
   >
   <$wikify name="text" text="""<$macrocall $name=newtext
 image=<> />""" output=html  mode=inline>
 <$wikify name="archive" text="""<$macrocall $name=newarchive
 archive=<> />""" output=html  mode=inline>
   <$set name="newtags"
 filter="[titleget[surnames]split[,]] [[image]]">
 <$action-createtiddler
   $basetitle=<>
   text=<>
   category=<>
   details=<>
  

[tw5] Re: Curious behavior

2021-05-10 Thread TW Tones
That result is common when your list is generating more instances that you 
expected.

It suggest an error in your code. A Quick fix may be to introduce 
+[limit[1]] in the filter generating it.
In this case we can see the problem is before adding the suffix image.jpg

Tones

On Tuesday, 11 May 2021 at 11:21:08 UTC+10 History Buff wrote:

> Sorry, I attempted to describe it in words which wasn't sufficient.
>
> What I want to result is the following (assume the filename is image.jpg):
>
> ./Archival_image/image.jpg
>
> What I actually get is this:
>
>
> ./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/image.jpg
>
> The number of times ./Archival_image/ is repeated seems random and, as I 
> said, can be as many as two or three all the way up to eighteen.
>
>
> On Monday, May 10, 2021 at 5:51:00 PM UTC-7 TW Tones wrote:
>
>> Do share an example of the "corrupt values", if could point to the 
>> problem without jumping into the code, or will this code work on 
>> tiddlywiki.com, if not can you make it?
>>
>> Tones
>>
>> On Tuesday, 11 May 2021 at 06:58:28 UTC+10 History Buff wrote:
>>
>>> All,
>>>
>>> I have a macro that has several edit text widgets and a button to save 
>>> these inputs to the fields of a newly created tiddler (see code below). I'm 
>>> having some issues with one particular field, namely the archive field. The 
>>> input is the filename of the image and what should be placed in the archive 
>>> field of the new tiddler is: ./Archival_images/filename. However, what ends 
>>> up being placed in there is the ./Archival_images/ string repeated a 
>>> seemingly random number of times. I've seen it repeated anywhere from three 
>>> times to eighteen times. I've tried slashes with both directions with no 
>>> difference. I've also tried the wikify widget without the output and mode 
>>> options with no difference in behavior. Any ideas on why that might be 
>>> happening?
>>>
>>> Thanks in advance.
>>>
>>>
>>> \define newtext(image)
>>>>> src="./Images/$image$.webp">
>>> \end
>>>
>>> \define newarchive(archive)
>>>   ./Archival_images/$archive$
>>> \end
>>>
>>> \define newImageEntry()
>>>   <$vars
>>> temp="$:/temp/NewImageEntry">
>>> Image Filename:
>>>   <$edit-text
>>> tiddler=<>
>>> field=filename
>>> tag=input
>>> class=fieldinput
>>> size=64
>>>   />
>>> 
>>> Archival Image Filename:
>>>   <$edit-text
>>> tiddler=<>
>>> field=archive
>>> tag=input
>>> class=fieldinput
>>> size=64
>>>   />
>>> 
>>> Image Category:
>>>   <$edit-text
>>> tiddler=<>
>>> field=category
>>> tag=input
>>> class=fieldinput
>>> size=64
>>> placeholder="Enter all categories separated by a comma."
>>>   />
>>> 
>>> Image Label:
>>>   <$edit-text
>>> tiddler=<>
>>> field=label
>>> class=fieldinput
>>> tag=input
>>> placeholder="Enter a brief label for the image."
>>> size=64
>>>   />
>>> 
>>> Image Details:
>>>   <$edit-text
>>> tiddler=<>
>>> field=details
>>> class=fieldarea
>>> tag=textarea
>>> placeholder="Enter any detailed information about the image."
>>>   />
>>> 
>>> Surnames:
>>>   <$edit-text
>>> tiddler=<>
>>> field=surnames
>>> tag=input
>>> class=fieldinput
>>> size=64
>>> placeholder="Enter all surnames separated by a comma."
>>>   />
>>> 
>>> <$button tooltip="save input"> 
>>> {{$:/images/google-material-design/image/two-tone/24px/add-a-photo}} Add 
>>> New Image
>>>   <$vars
>>> filename={{{ [titleget[filename]] }}}
>>> archive={{{ [titleget[archive]] }}}
>>> category={{{ [titleget[category]] }}}
>>> label={{{ [titleget[label]] }}}
>>> details={{{ [titleget[details]] }}}
>>>   >
>>>   <$wikify name="text" text="""<$macrocall $name=newtext 
>>> image=<> />""" output=html  mode=inline>
>>> <$wikify name="archive" text="""<$macrocall $name=newarchive 
>>> archive=<> />""" output=html  mode=inline>
>>>   <$set name="newtags" 
>>> filter="[titleget[surnames]split[,]] [[image]]">
>>> <$action-createtiddler
>>>   $basetitle=<>
>>>   text=<>
>>>   category=<>
>>>   details=<>
>>>   label=<>
>>>   tags=<>
>>>   archive=<>
>>>   hide-body="yes"
>>> />
>>>   
>>> 
>>>   
>>> 
>>> <$action-deletetiddler $filter="[]" />
>>> 
>>> <$button tooltip="cancel input"> {{$:/core/images/cancel-button}} 
>>> Clear Entries
>>>   <$action-deletetiddler $filter="[]" />
>>> 
>>>   
>>> \end
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 

[tw5] Re: Curious behavior

2021-05-10 Thread History Buff
Sorry, I attempted to describe it in words which wasn't sufficient.

What I want to result is the following (assume the filename is image.jpg):

./Archival_image/image.jpg

What I actually get is this:

./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/./Archival_image/image.jpg

The number of times ./Archival_image/ is repeated seems random and, as I 
said, can be as many as two or three all the way up to eighteen.


On Monday, May 10, 2021 at 5:51:00 PM UTC-7 TW Tones wrote:

> Do share an example of the "corrupt values", if could point to the problem 
> without jumping into the code, or will this code work on tiddlywiki.com, 
> if not can you make it?
>
> Tones
>
> On Tuesday, 11 May 2021 at 06:58:28 UTC+10 History Buff wrote:
>
>> All,
>>
>> I have a macro that has several edit text widgets and a button to save 
>> these inputs to the fields of a newly created tiddler (see code below). I'm 
>> having some issues with one particular field, namely the archive field. The 
>> input is the filename of the image and what should be placed in the archive 
>> field of the new tiddler is: ./Archival_images/filename. However, what ends 
>> up being placed in there is the ./Archival_images/ string repeated a 
>> seemingly random number of times. I've seen it repeated anywhere from three 
>> times to eighteen times. I've tried slashes with both directions with no 
>> difference. I've also tried the wikify widget without the output and mode 
>> options with no difference in behavior. Any ideas on why that might be 
>> happening?
>>
>> Thanks in advance.
>>
>>
>> \define newtext(image)
>>> src="./Images/$image$.webp">
>> \end
>>
>> \define newarchive(archive)
>>   ./Archival_images/$archive$
>> \end
>>
>> \define newImageEntry()
>>   <$vars
>> temp="$:/temp/NewImageEntry">
>> Image Filename:
>>   <$edit-text
>> tiddler=<>
>> field=filename
>> tag=input
>> class=fieldinput
>> size=64
>>   />
>> 
>> Archival Image Filename:
>>   <$edit-text
>> tiddler=<>
>> field=archive
>> tag=input
>> class=fieldinput
>> size=64
>>   />
>> 
>> Image Category:
>>   <$edit-text
>> tiddler=<>
>> field=category
>> tag=input
>> class=fieldinput
>> size=64
>> placeholder="Enter all categories separated by a comma."
>>   />
>> 
>> Image Label:
>>   <$edit-text
>> tiddler=<>
>> field=label
>> class=fieldinput
>> tag=input
>> placeholder="Enter a brief label for the image."
>> size=64
>>   />
>> 
>> Image Details:
>>   <$edit-text
>> tiddler=<>
>> field=details
>> class=fieldarea
>> tag=textarea
>> placeholder="Enter any detailed information about the image."
>>   />
>> 
>> Surnames:
>>   <$edit-text
>> tiddler=<>
>> field=surnames
>> tag=input
>> class=fieldinput
>> size=64
>> placeholder="Enter all surnames separated by a comma."
>>   />
>> 
>> <$button tooltip="save input"> 
>> {{$:/images/google-material-design/image/two-tone/24px/add-a-photo}} Add 
>> New Image
>>   <$vars
>> filename={{{ [titleget[filename]] }}}
>> archive={{{ [titleget[archive]] }}}
>> category={{{ [titleget[category]] }}}
>> label={{{ [titleget[label]] }}}
>> details={{{ [titleget[details]] }}}
>>   >
>>   <$wikify name="text" text="""<$macrocall $name=newtext 
>> image=<> />""" output=html  mode=inline>
>> <$wikify name="archive" text="""<$macrocall $name=newarchive 
>> archive=<> />""" output=html  mode=inline>
>>   <$set name="newtags" filter="[titleget[surnames]split[,]] 
>> [[image]]">
>> <$action-createtiddler
>>   $basetitle=<>
>>   text=<>
>>   category=<>
>>   details=<>
>>   label=<>
>>   tags=<>
>>   archive=<>
>>   hide-body="yes"
>> />
>>   
>> 
>>   
>> 
>> <$action-deletetiddler $filter="[]" />
>> 
>> <$button tooltip="cancel input"> {{$:/core/images/cancel-button}} 
>> Clear Entries
>>   <$action-deletetiddler $filter="[]" />
>> 
>>   
>> \end
>>
>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f7f665bd-d8d7-492c-8803-d31954db7639n%40googlegroups.com.


[tw5] Re: Curious behavior

2021-05-10 Thread TW Tones
Do share an example of the "corrupt values", if could point to the problem 
without jumping into the code, or will this code work on tiddlywiki.com, if 
not can you make it?

Tones

On Tuesday, 11 May 2021 at 06:58:28 UTC+10 History Buff wrote:

> All,
>
> I have a macro that has several edit text widgets and a button to save 
> these inputs to the fields of a newly created tiddler (see code below). I'm 
> having some issues with one particular field, namely the archive field. The 
> input is the filename of the image and what should be placed in the archive 
> field of the new tiddler is: ./Archival_images/filename. However, what ends 
> up being placed in there is the ./Archival_images/ string repeated a 
> seemingly random number of times. I've seen it repeated anywhere from three 
> times to eighteen times. I've tried slashes with both directions with no 
> difference. I've also tried the wikify widget without the output and mode 
> options with no difference in behavior. Any ideas on why that might be 
> happening?
>
> Thanks in advance.
>
>
> \define newtext(image)
> src="./Images/$image$.webp">
> \end
>
> \define newarchive(archive)
>   ./Archival_images/$archive$
> \end
>
> \define newImageEntry()
>   <$vars
> temp="$:/temp/NewImageEntry">
> Image Filename:
>   <$edit-text
> tiddler=<>
> field=filename
> tag=input
> class=fieldinput
> size=64
>   />
> 
> Archival Image Filename:
>   <$edit-text
> tiddler=<>
> field=archive
> tag=input
> class=fieldinput
> size=64
>   />
> 
> Image Category:
>   <$edit-text
> tiddler=<>
> field=category
> tag=input
> class=fieldinput
> size=64
> placeholder="Enter all categories separated by a comma."
>   />
> 
> Image Label:
>   <$edit-text
> tiddler=<>
> field=label
> class=fieldinput
> tag=input
> placeholder="Enter a brief label for the image."
> size=64
>   />
> 
> Image Details:
>   <$edit-text
> tiddler=<>
> field=details
> class=fieldarea
> tag=textarea
> placeholder="Enter any detailed information about the image."
>   />
> 
> Surnames:
>   <$edit-text
> tiddler=<>
> field=surnames
> tag=input
> class=fieldinput
> size=64
> placeholder="Enter all surnames separated by a comma."
>   />
> 
> <$button tooltip="save input"> 
> {{$:/images/google-material-design/image/two-tone/24px/add-a-photo}} Add 
> New Image
>   <$vars
> filename={{{ [titleget[filename]] }}}
> archive={{{ [titleget[archive]] }}}
> category={{{ [titleget[category]] }}}
> label={{{ [titleget[label]] }}}
> details={{{ [titleget[details]] }}}
>   >
>   <$wikify name="text" text="""<$macrocall $name=newtext 
> image=<> />""" output=html  mode=inline>
> <$wikify name="archive" text="""<$macrocall $name=newarchive 
> archive=<> />""" output=html  mode=inline>
>   <$set name="newtags" filter="[titleget[surnames]split[,]] 
> [[image]]">
> <$action-createtiddler
>   $basetitle=<>
>   text=<>
>   category=<>
>   details=<>
>   label=<>
>   tags=<>
>   archive=<>
>   hide-body="yes"
> />
>   
> 
>   
> 
> <$action-deletetiddler $filter="[]" />
> 
> <$button tooltip="cancel input"> {{$:/core/images/cancel-button}} 
> Clear Entries
>   <$action-deletetiddler $filter="[]" />
> 
>   
> \end
>
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3fb741bf-9040-45e1-a141-d3f8852691ecn%40googlegroups.com.