Please don’t apologise—no need at all! Working via translation just sometimes takes a bit more exchange, but we are not in in a rush.
Re Question 1. Ah OK, you aren’t moving anything. The Stamp is collecting, via Action code using collect()
, the $Text of all child notes and using the resulting string as the $Text of the note being stamped. So, why are the extra "
(straight double quotes, Unicode 0022
) are added to the start/end of the child notes’ $Text that is collected?
The answer is given if you make a child note with no Japanese text/fonts. That note’s text is collected without the "
. Why the difference? When Tinderbox makes a list (i.e. List-data type) if Tinderbox detects items in the per-list-item string that might confuse parsing out list items, Tinderbox wraps that item in quotes. However, when using such quote-enclosed list items, Tinderbox is less good at detecting and removing the quote that Tinderbox added for its own internal purposes!.
So, if I use a stamp like this on ‘Note 11’:
$Text=collect(children("Note 11"),$Text).at(0);
and ask for list items #1 (list addresses are zero-based) I’d expect the text of ‘Note 9’ without the extra quotes. Sadly I still get the quotes.
The fact this hasn’t been noticed is that it only occurs when using lists and working with East Asian languages (or Japanese, et least). Not your error, but one that is hard to detect until you see it.
Hopefully (@eastgate?) Tinderbox could detect and remove the list-item-wrapper quotes it adds.
Regardless, a better way for Wakamatsu-san and others encountering the language/locale-caused issue with quotes is to do your collect a different way. So, replace this:
$Text=collect(children,$Text).replace(';','\n');
with:
$Text =;
var:list vList = collect(children,$Text);
var:string vItemText ="";
var:string vStr= "";
vList.each(anItem){
if(anItem.beginsWith('"')){
vItemText = anItem.substr(1,-1)+"\n";
}else{
vItemText = anItem+"\n";
}
$Text += vItemText;
}
Or if you want to strip these quotes is after flattening to a single string, use:
$Text = collect(children,$Text).replace('^"',"").replace('"$',"").replace('";"',"\n");