[listwords words=[t_words]&delimiters=12345][word][delimiter][/ listwords]
The result of this code is:something1some_other2one_more4So, WebDNA's [delimiter] tag shows the delimiter that occurs BEFORE the current word, not the delimiter AFTER the current word. This is predictable, and equally as good a choice as showing the AFTER delimiter.Also of note here is that if there are two sequential delimiters between words, only the last delimiter is shown.What I would like to see if anything is to change here is:1) [delimiter] should continue to behave exactly as it does now, so no existing code breaks.2) Parameters could be added to the delimiter tag to get more specific results:[delimiter before] would show the delimiter (if any) before the current word[delimiter after] would show the delimiter (if any) that occurs before the current word3) The "tabs" parameter to listwords, is defined as: "Setting Tabs=T causes the list of words to break at tab boundaries only, and runs of tabs are not collapsed. This assists in parsing special formats where two tabs in a row are important and should not be skipped."I would like to see the tabs parameter expanded such that if you specify a delimiters param, then consecutive runs of the specified delimiters would similarly not be collapsed, so you could loop through a list of comma-delimited (or anything else) values and get blank [word] values between consecutive delimiters.Brian FriesBrainScan SoftwareOn Oct 17, 2009, at 3:42 PM, Donovan Brooke wrote:> Hello,>> Like we do every week/weekend.. we are working on WebDNA. :-)>> However, I thought I'd start getting some opinions from the list> on some of the questionable "bugs" we are dealing with.>> The first one I have for you is a potential bug for listwords> and it's delimiter tag.>>>> [text]t_words=something,some_other,one_more[/text]>> [listwords words=[t_words]][word][delimiter][/listwords]>
>> I would expect the above to output:>> 'something,some_other,one_more'>> However, it outputs:> 'somethingsome_other,one_more,'>>> To get it to output as I expect, I have put the delimiter before > [word]:>>> [listwords words=[t_words]][delimiter][word][/listwords]>
>> gives:> 'something,some_other,one_more'>>> Now, before we go changing things, I wanted to see if you guys> think there is reasoning for the way it behaves like it does. :-)>> I do have some reasoning myself.. as I have used the later hack> in some of my websites.. and changing the way it behaves would> cause me to either not upgrade or to edit those areas upon upgrade.>> However, I won't let that stand in the way of progress! ;-)>> So, let me know.>> Donovan>>>>> -- > Donovan Brooke> WebDNA Software Corporation> http://www.webdna.us> **[Square Bracket Utopia]**> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list
|
[listwords words=[t_words]&delimiters=12345][word][delimiter][/ listwords]
The result of this code is:something1some_other2one_more4So, WebDNA's [delimiter] tag shows the delimiter that occurs BEFORE the current word, not the delimiter AFTER the current word. This is predictable, and equally as good a choice as showing the AFTER delimiter.Also of note here is that if there are two sequential delimiters between words, only the last delimiter is shown.What I would like to see if anything is to change here is:1) [delimiter] should continue to behave exactly as it does now, so no existing code breaks.2) Parameters could be added to the delimiter tag to get more specific results:[delimiter before] would show the delimiter (if any) before the current word[delimiter after] would show the delimiter (if any) that occurs before the current word3) The "tabs" parameter to listwords, is defined as: "Setting Tabs=T causes the list of words to break at tab boundaries only, and runs of tabs are not collapsed. This assists in parsing special formats where two tabs in a row are important and should not be skipped."I would like to see the tabs parameter expanded such that if you specify a delimiters param, then consecutive runs of the specified delimiters would similarly not be collapsed, so you could loop through a list of comma-delimited (or anything else) values and get blank [word] values between consecutive delimiters.Brian FriesBrainScan SoftwareOn Oct 17, 2009, at 3:42 PM, Donovan Brooke wrote:> Hello,>> Like we do every week/weekend.. we are working on WebDNA. :-)>> However, I thought I'd start getting some opinions from the list> on some of the questionable "bugs" we are dealing with.>> The first one I have for you is a potential bug for listwords> and it's delimiter tag.>>>> [text]t_words=something,some_other,one_more[/text]>> [listwords words=[t_words]][word][delimiter][/listwords]>
>> I would expect the above to output:>> 'something,some_other,one_more'>> However, it outputs:> 'somethingsome_other,one_more,'>>> To get it to output as I expect, I have put the delimiter before > [word]:>>> [listwords words=[t_words]][delimiter][word][/listwords]>
>> gives:> 'something,some_other,one_more'>>> Now, before we go changing things, I wanted to see if you guys> think there is reasoning for the way it behaves like it does. :-)>> I do have some reasoning myself.. as I have used the later hack> in some of my websites.. and changing the way it behaves would> cause me to either not upgrade or to edit those areas upon upgrade.>> However, I won't let that stand in the way of progress! ;-)>> So, let me know.>> Donovan>>>>> -- > Donovan Brooke> WebDNA Software Corporation> http://www.webdna.us> **[Square Bracket Utopia]**> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing listDOWNLOAD WEBDNA NOW!
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...