you need to call $tw.utils.stringifyList(listofTiddlerTitles) inorder to
convert it to a space seperated list
On Friday, June 20, 2014 9:24:16 AM UTC+2, Matabele wrote:
>
> Hi BJ
>
> I had a need to resort a current list -- consequently I wrote a widget to
> store the output of a filter expression to a text reference. I then noticed
> that when stored to a standard field, the list was comma separated, but
> when stored to a the list field it became space separated.
>
> It would appear, therefore, that filter expressions for lists require the
> list to be space separated?
>
> regards
>
> On Friday, June 20, 2014 8:47:04 AM UTC+2, BJ wrote:
>>
>> In what sense do you mean 'use'?
>> in boot you can see:
>> $tw.modules.define("$:/boot/tiddlerfields/list","tiddlerfield",{
>> name: "list",
>> parse: $tw.utils.parseStringArray,
>> stringify: $tw.utils.stringifyList
>> });
>> which means that the 'list' field will be converted from space separated
>> list of tag-strings (including [[tag forn]] of tags) to an array of strings
>> (and converted back) whenb reading and writing via javascript. (eg
>> addTiddler() function)
>>
>>
>> On Friday, June 20, 2014 8:05:36 AM UTC+2, Matabele wrote:
>>>
>>> Hi BJ
>>>
>>> Thanks -- I was trying to do something like this, but wanted to use a
>>> field other than the list field -- then I ran across the problem that the
>>> 'list' field uses a space separated list and other fields use a comma
>>> separated list. This necessitated creating the list in a 'list' field, then
>>> storing the space separated list into another standard field.
>>>
>>> Wondered whether it was possible to use a standard field in exactly the
>>> same way as the 'list' field?
>>>
>>> regards
>>>
>>> On Friday, June 20, 2014 7:59:22 AM UTC+2, BJ wrote:
>>>>
>>>> Hi Matabele,
>>>> the list field is used to re-order to a list of tiddlers, you can see
>>>> how I have used it here:
>>>> http://bjhacks.tiddlyspot.com/#TagList
>>>> <http://bjhacks.tiddlyspot.com/#TagList:>
>>>>
>>>> cheers
>>>> BJ
>>>>
>>>> On Thursday, June 19, 2014 9:04:28 PM UTC+2, Matabele wrote:
>>>>>
>>>>> Hi
>>>>>
>>>>> I have been playing around with lists, but am a little confused about
>>>>> the behaviour of the list (and tags) field when compared with standard
>>>>> fields.
>>>>>
>>>>> Say a standard field 'myfield' contains a comma separated list. If I
>>>>> then set the value of the 'list' field to this value, the comma separated
>>>>> list will be transformed into a space separated list.
>>>>>
>>>>> The converse is not true. If I then set the value of 'myfield' to the
>>>>> value of the 'list' field, the value in 'myfield' will now be space
>>>>> separated.
>>>>>
>>>>> Does this effect the behaviour of filter operators for lists? (can
>>>>> comma separated and space separated lists be used in the same way?)
>>>>>
>>>>> regards
>>>>>
>>>>
--
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.