Re: Are they really global tags?

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 41624
interpreted = N
texte = When WebDNA finds a square bracket ([) it parses the first word from within then looks for it among all the possible pools of defined values:Database fields (within a founditems context) Line items fields (within a lineitems context) Order file Headers (within an orderfile context) Include file parameters Text variables Math variables Form variables Context-sensitive WebDNA keywords (eg. index, numfound) Global WebDNA keywords (eg. search, replace)I ran some tests with variables named date, index and numfound and determined that the above is the approximate order of priority (I didn't test order files, but we should all know the problem with the date header in the order files overriding the [date] DNA tag).The above sequence is altered if you use secure=F in you're text variables - insecure variables move to the bottom of the list.I also noticed the index is an exception - it always returns the index value for the current loop (listvariables, founditems, etc) if available, rather than any otherwise defined variable. This is why my number one pet peeve, and the first piece of advice I pass on to any budding WebDNA'ers is to utilize clear naming conventions. Feel free to define your own, but for reference, here's a summary of my conventions:All text variables begin with t All math variables begin with m All include parameters begin with i All database fields begin with a 3-letter code for the database (eg. mem for member.db or ord for order.db) All parameters to a page (url or form) begin with p -- Oh, and never ever name a submit button on a search form search ;)- brian At 4:36 PM 7/16/02, Kenneth Grome wrote: >I just did a test. What I learned is surprising. The following >global tags can be eaasily overridden simply by setting them to >text variables: > >[Date] >[ElapsedTime] >[FreeMemory] >[LastRandom] >[Platform] >[Product] >[Random] >[Time] >[ValidCard] >[Version] > >Isn't the whole idea behind global tags that they will *always* >produce the value described in the docs -- thus the term GLOBAL tags? > >If so, then why can I override these values with a simple [text] >variable assignment? > > >Sincerely, >Kenneth Grome > >--------------------------------------------------- >WebDNA Professional Training and Development Center >175 J. Llorente Street +63 (32) 255-6921 >Cebu City, Cebu 6000 kengrome@webdna.net >Philippines http://www.webdna.net >---------------------------------------------------------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Are they really global tags? (John Hill 2002)
  2. Re: Are they really global tags? (Bob Minor 2002)
  3. Re: Are they really global tags? (Robert Wade 2002)
  4. Re: Are they really global tags? (Dan Strong 2002)
  5. Re: Are they really global tags? (Brian Fries 2002)
  6. Re: Are they really global tags? (Kenneth Grome 2002)
  7. Are they really global tags? (Kenneth Grome 2002)
When WebDNA finds a square bracket ([) it parses the first word from within then looks for it among all the possible pools of defined values:Database fields (within a founditems context) Line items fields (within a lineitems context) order file Headers (within an orderfile context) Include file parameters Text variables Math variables Form variables Context-sensitive WebDNA keywords (eg. index, numfound) Global WebDNA keywords (eg. search, replace)I ran some tests with variables named date, index and numfound and determined that the above is the approximate order of priority (I didn't test order files, but we should all know the problem with the date header in the order files overriding the [date] DNA tag).The above sequence is altered if you use secure=F in you're text variables - insecure variables move to the bottom of the list.I also noticed the index is an exception - it always returns the index value for the current loop (listvariables, founditems, etc) if available, rather than any otherwise defined variable. This is why my number one pet peeve, and the first piece of advice I pass on to any budding WebDNA'ers is to utilize clear naming conventions. Feel free to define your own, but for reference, here's a summary of my conventions:All text variables begin with t All math variables begin with m All include parameters begin with i All database fields begin with a 3-letter code for the database (eg. mem for member.db or ord for order.db) All parameters to a page (url or form) begin with p -- Oh, and never ever name a submit button on a search form search ;)- brian At 4:36 PM 7/16/02, Kenneth Grome wrote: >I just did a test. What I learned is surprising. The following >global tags can be eaasily overridden simply by setting them to >text variables: > >[date] >[elapsedtime] >[freememory] >[LastRandom] >[platform] >[Product] >[random] >[time] >[validcard] >[version] > >Isn't the whole idea behind global tags that they will *always* >produce the value described in the docs -- thus the term GLOBAL tags? > >If so, then why can I override these values with a simple [text] >variable assignment? > > >Sincerely, >Kenneth Grome > >--------------------------------------------------- >WebDNA Professional Training and Development Center >175 J. Llorente Street +63 (32) 255-6921 >Cebu City, Cebu 6000 kengrome@webdna.net >Philippines http://www.webdna.net >---------------------------------------------------------------------------------------------------------------- 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://search.smithmicro.com/ Brian Fries

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:

WebDNA error. (2006) WebCat2b13MacPlugIn - syntax to convert date (1997) [sendmail] questions... (1997) Satistics (1999) Database Structure? (1998) Nested tags count question (1997) format_to_days on NT (1997) Multiple prices (1997) Listserver problem (1997) Bug Report, maybe (1997) Re[2]: Searchable archives gone again??? (2000) Problems searching from a FORM (1997) Re(6): Small Bug: ErrorLog.txt/[FORMVARIABLES]/[ORDERFILE] (1998) WC2f3 (1997) WebDNA Writer Needed (1997) errors 550, and 108 (1998) WebCat2_Mac RETURNs in .db (1997) Web*SSL and WebCatalog (1997) Authentication on NT server (2000) [WebDNA] WebDNA variable from form contents (2010)