Re: Don't know if this is a sily question...
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 50775
interpreted = N
texte = Yes, the text variable method is a useful technique, but takes careful crafting. I also have used similar techniques for years, but the new [function] context makes it sooo much easier, especially when you get more complex with the reusable code blocks, and when you want to do something recursive. It's worth the price of admission for me.- brianOn Thursday, May 29, 2003, at 10:18 AM, Kenneth Grome wrote:>> As a related comment, using WebDNA 5 I find myself more often using >> [function]s where I used to use [include]s to handle recurring tasks. >> The formal use of parameters, the local scope variables, and the >> ability to define functions within the page itself as well as in a >> shared include file are compelling features.>>>> As a simple example:>>>> [function name=MyLink]>> [return]
> db=....&value=[thevalue]&returnfield=ID]>[lookup >> db=....&value=[thevalue]&returnfield=title][/return]>> [/function]>>>> [search ...]>> [founditems]>> [MyLink thevalue=[whatever]]>> [/founditems]>> [/search]>>>> - brian>>> I've been doing something similar for years, without v5's function > context:>> [text]myLink=[raw]
db=....&value=[thevalue]&returnfield=ID]>[lookup > db=....&value=[thevalue]&returnfield=title][/raw][/text]>> [search ...]> [founditems]> [myLink]> [/founditems]> [/search]>> This has always been an easy way to create a variable once at the top > of the page, and then use it any number of times further down on the > same page -- while preventing the webdna code inside the text variable > from being interpreted until the variable tag is used further down on > the page -- such as inside the founditems context in this example.> -- >> Sincerely,> Kenneth Grome> -------------------------------------------------------------> My programmers will write WebDNA code for you at $27 an hour!> ------------------------------------------------------------->> -------------------------------------------------------------> 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/>-------------------------------------------------------------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:
Yes, the text variable method is a useful technique, but takes careful crafting. I also have used similar techniques for years, but the new [function] context makes it sooo much easier, especially when you get more complex with the reusable code blocks, and when you want to do something recursive. It's worth the price of admission for me.- brianOn Thursday, May 29, 2003, at 10:18 AM, Kenneth Grome wrote:>> As a related comment, using WebDNA 5 I find myself more often using >> [function]s where I used to use [include]s to handle recurring tasks. >> The formal use of parameters, the local scope variables, and the >> ability to define functions within the page itself as well as in a >> shared include file are compelling features.>>>> As a simple example:>>>> [function name=MyLink]>> [return]> db=....&value=[thevalue]&returnfield=ID]>[lookup >> db=....&value=[thevalue]&returnfield=title]
[/return]>> [/function]>>>> [search ...]>> [founditems]>> [MyLink thevalue=[whatever]]>> [/founditems]>> [/search]>>>> - brian>>> I've been doing something similar for years, without v5's function > context:>> [text]myLink=[raw] db=....&value=[thevalue]&returnfield=ID]>[lookup > db=....&value=[thevalue]&returnfield=title]
[/raw][/text]>> [search ...]> [founditems]> [myLink]> [/founditems]> [/search]>> This has always been an easy way to create a variable once at the top > of the page, and then use it any number of times further down on the > same page -- while preventing the webdna code inside the text variable > from being interpreted until the variable tag is used further down on > the page -- such as inside the founditems context in this example.> -- >> Sincerely,> Kenneth Grome> -------------------------------------------------------------> My programmers will write WebDNA code for you at $27 an hour!> ------------------------------------------------------------->> -------------------------------------------------------------> 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/>-------------------------------------------------------------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/
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:
Group Updates (1998)
WebDNA 4.5 OS9 (2004)
Languages (1997)
reading a email (2000)
Bulletin Board (1998)
[taxRate] [TaxTotal] ? (1997)
Secure server question (1997)
security (1997)
Snake Bites (1997)
In Digest Dijon (2000)
WebCommerce: Folder organization ? (1997)
Support ?? (1997)
Email (1998)
Dark Horse Comics success story (1997)
Quit revisited (1997)
Plugin or CGI or both (1997)
OT: IP addres checking (2003)
[ShowIf] and empty fields (1997)
WC2b12: Yes, Formulas.db is for real (1997)
select multiple (1997)