Re: tabs as delimiters

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 59579
interpreted = N
texte = Thanks Ken. Yes, now that you point this out, it's perfectly clear. Of course I know you can't put tabs in field - why didn't I see that? I wonder why they use the tabs=t in the first place for listwords? Why not a general parameter like collapse=F, then you can use whatever delimiter you like? I tried using a pipe (which I normally use), and on speculation added |=T, but that didn't get me anywhere. Now I see what's happening. The stored value is correct, but with another character in place of tabs. Inspecting my database in BBedit I find the tab char is now replaced with /0x1D whatever that is. But it's a moot point, if WebCat isn't going to spit it out again as a real tab. I wonder how tabs=T would actually be practical then. So my address block variables are being populated not by the listwords-generated variables, but by the formvariables coming into the page, since listwords is stopping on index=1. Back to the drawing board on this one. I'll figure out a showif solution, unless anyone knows a more direct approach. Terry Ken wrote: >You cannot store tabs in a db field because the fields themselves are >delimited by tabs. Of course this means you cannot use the tab >character as a delimiter in your listwords context either. >Try using the delimiter character that webdna changes the tab into >when it writes your makeaddress value to the db, then maybe your >listwords context will work properly. >But first, check the db to see what's actually being stored in the >rnk field. My guess is that only the first value (rnk_1) is being >stored in the db anyways, because putting tabs in the replace context >is bad syntax to begin with so webdna will probably only replace the >part before the first tab. >Or just use another delimiter instead of trying to use tabs. >Sincerely, >Kenneth Grome >www.kengrome.com >--------------------------------------------------------_25328621_- >Message-Id: >Date: Fri, 8 Oct 2004 22:35:08 -0400 >From: Terry Wilson >Subject: Re: tabs as delimiters >Content-Type: text/plain; charset="us-ascii" ; format="flowed" > >Thanks Brian. Here's the code: > = a real, typed tab > >[!]knit together address [/!] **Note [rnk_1] is blank in this example >[text]makeaddress=[rnk_1][rnk_2][rnk_3][rnk_4][rnk_5][/text] > >[!]stick it in the db [/!] >[replace db=[db]&eqcatdatarq=settings]rnk=[makeaddress][/replace] > >[!]pull it apart later [/!] >[search db=[db]&eqcatdatarq=settings][founditems] >[listwords >delimiters=&tabs=T&words=[rnk]][text]rnk_[index]=[word][/text][/listwords] >[text]eventvenue=[rnk_1][/text] >[text]eventaddress=[rnk_2][/text] >[text]eventcity=[rnk_3][/text] >[text]eventstate=[rnk_4][/text] >[text]eventzip=[rnk_5][/text] >[/founditems][/search] > > >[eventvenue]
>[eventaddress]
>[eventcity], [eventstate] [eventzip] > >...which resolves to >123 MainAnycityNJ08055 (boxes where the tabs would be) <<--this >should be blank >123 Main >Anycity, NJ 08055 > > >Everything was fine with the pipe character until I tested it with >the first field empty, in case the venue was just an address, no >restaurant name or anything. That's when I discovered that empty >words in a listwords were just tossed away, and everything moved up >a notch.. Now, with the tabs, the first slot gets filled with the >whole string. I just can't see what's going on here. I'd rather not >have to require an entry in every field. >Terry > >Brian wrote: >Tabs work fine - just type them in - but you could be running into >mismanaged URL contexts or something. Can you show an example of code >that doesn't work? >- Brian >On Oct 8, 2004, at 11:40 AM, Terry Wilson wrote: >> When you use a tab as a delimiter in a string so you can split it >> apart later via listwords, with blank entries intact: >> >> Is there a trick to putting the tab character into your code? Do you >> just use the tab key on the keyboard, or what? I can't seem to get it >> to work. >> >> Thanks, >> Terry ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: tabs as delimiters NOT ( Rob Marquardt 2004)
  2. Re: tabs as delimiters NOT ( Terry Wilson 2004)
  3. Re: tabs as delimiters ( John Peacock 2004)
  4. Re: tabs as delimiters ( Terry Wilson 2004)
  5. Re: tabs as delimiters ( "WebDna @ Inkblot Media" 2004)
  6. Re: tabs as delimiters ( Terry Wilson 2004)
  7. Re: tabs as delimiters ( Brian Fries 2004)
  8. Re: tabs as delimiters ( Terry Wilson 2004)
  9. Re: tabs as delimiters ( Kenneth Grome 2004)
  10. Re: tabs as delimiters ( Terry Wilson 2004)
  11. Re: tabs as delimiters ( Kenneth Grome 2004)
  12. Re: tabs as delimiters ( Terry Wilson 2004)
  13. Re: tabs as delimiters ( Brian Fries 2004)
  14. tabs as delimiters ( Terry Wilson 2004)
Thanks Ken. Yes, now that you point this out, it's perfectly clear. Of course I know you can't put tabs in field - why didn't I see that? I wonder why they use the tabs=t in the first place for listwords? Why not a general parameter like collapse=F, then you can use whatever delimiter you like? I tried using a pipe (which I normally use), and on speculation added |=T, but that didn't get me anywhere. Now I see what's happening. The stored value is correct, but with another character in place of tabs. Inspecting my database in BBedit I find the tab char is now replaced with /0x1D whatever that is. But it's a moot point, if WebCat isn't going to spit it out again as a real tab. I wonder how tabs=T would actually be practical then. So my address block variables are being populated not by the listwords-generated variables, but by the formvariables coming into the page, since listwords is stopping on index=1. Back to the drawing board on this one. I'll figure out a showif solution, unless anyone knows a more direct approach. Terry Ken wrote: >You cannot store tabs in a db field because the fields themselves are >delimited by tabs. Of course this means you cannot use the tab >character as a delimiter in your listwords context either. >Try using the delimiter character that webdna changes the tab into >when it writes your makeaddress value to the db, then maybe your >listwords context will work properly. >But first, check the db to see what's actually being stored in the >rnk field. My guess is that only the first value (rnk_1) is being >stored in the db anyways, because putting tabs in the replace context >is bad syntax to begin with so webdna will probably only replace the >part before the first tab. >Or just use another delimiter instead of trying to use tabs. >Sincerely, >Kenneth Grome >www.kengrome.com >--------------------------------------------------------_25328621_- >Message-Id: >Date: Fri, 8 Oct 2004 22:35:08 -0400 >From: Terry Wilson >Subject: Re: tabs as delimiters >Content-Type: text/plain; charset="us-ascii" ; format="flowed" > >Thanks Brian. Here's the code: > = a real, typed tab > >[!]knit together address [/!] **Note [rnk_1] is blank in this example >[text]makeaddress=[rnk_1][rnk_2][rnk_3][rnk_4][rnk_5][/text] > >[!]stick it in the db [/!] >[replace db=[db]&eqcatdatarq=settings]rnk=[makeaddress][/replace] > >[!]pull it apart later [/!] >[search db=[db]&eqcatdatarq=settings][founditems] >[listwords >delimiters=&tabs=T&words=[rnk]][text]rnk_[index]=[word][/text][/listwords] >[text]eventvenue=[rnk_1][/text] >[text]eventaddress=[rnk_2][/text] >[text]eventcity=[rnk_3][/text] >[text]eventstate=[rnk_4][/text] >[text]eventzip=[rnk_5][/text] >[/founditems][/search] > > >[eventvenue]
>[eventaddress]
>[eventcity], [eventstate] [eventzip] > >...which resolves to >123 MainAnycityNJ08055 (boxes where the tabs would be) <<--this >should be blank >123 Main >Anycity, NJ 08055 > > >Everything was fine with the pipe character until I tested it with >the first field empty, in case the venue was just an address, no >restaurant name or anything. That's when I discovered that empty >words in a listwords were just tossed away, and everything moved up >a notch.. Now, with the tabs, the first slot gets filled with the >whole string. I just can't see what's going on here. I'd rather not >have to require an entry in every field. >Terry > >Brian wrote: >Tabs work fine - just type them in - but you could be running into >mismanaged URL contexts or something. Can you show an example of code >that doesn't work? >- Brian >On Oct 8, 2004, at 11:40 AM, Terry Wilson wrote: >> When you use a tab as a delimiter in a string so you can split it >> apart later via listwords, with blank entries intact: >> >> Is there a trick to putting the tab character into your code? Do you >> just use the tab key on the keyboard, or what? I can't seem to get it >> to work. >> >> Thanks, >> Terry ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Terry Wilson

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

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...

Related Readings:

Format question WC Mac f3 (1997) JavaScript: Select All Checkboxes (2001) WebDNA & Suse Linux (2004) RE: Webcat 2.0.1b1 bug with IE 3.01/4.0p1 (1997) Transferring [cart] to Database (1997) Reversed words (1997) WebDNA Solutions ... sorry! (1997) Best POS product w/ WebCat? (2000) # fields limited? (1997) Re:Comments Convertion-part2 (1998) Ampersand (1997) Location of Browser Info.txt file (1997) WCf2 and nested tags (1997) Question about links (1999) sorted cart? (1998) Uniqueness of [cart] (was Number of cars in cart...) (2004) Protect (1997) WebCatalog Features (1997) Verisign is at it again (2003) Credit Card Number checking (1997)