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:

Math, Multiple Equasions and Show/Hide (1998) MS Access data conversion (2001) Happy New Year (2008) service stop and restart (1997) problems with 2 tags (1997) Unique SKU Numbers (2000) Any way to index the contents of a PDF file with WebCatalog? (2000) searching multiple databases in single search (1997) Thanks and new Question on lineitems (2002) Formatting Email (2000) WebCatalog and WebMerchant reviewed by InfoWorld (1997) Sending Email (2004) Read and weep (2003) Where is Typhoon 3.x? (2000) [WebDNA] Listfields in an input environment (2018) Formulas.db + Users.db (1997) docs for WebCatalog2 (1997) Fun with dates (1997) [WebDNA] maybe silly suggestion? [founditems] (2015) New public beta available (1997)