Re: 3.0 [TEXT] variables
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 20498
interpreted = N
texte = On 10/15/98 4:57 PM, Dave MacLeay so noted...>A simple example would be a form with several checkboxes. Currently there>is a lot of code out there that deals with it like this:>> [Append ...]CheckBox1=[ShowIf>[CheckBox1]=[raw][CheckBox1][/raw]]F[/ShowIf][HideIf>[CheckBox1]=[raw][CheckBox1][/raw]][CheckBox1]&CheckBox2=[ShowIf>[CheckBox2]=[raw][CheckBox2][/raw]]F[/ShowIf][HideIf>[CheckBox2]=[raw][CheckBox2][/raw]][CheckBox2][/Append]>>Every time you want to use a checkbox value, you have to go through the>whole [ShowIf]/[HideIf] routine again. What a drag.I had mentioned something to this effect last week on the subject of adding the information from a large number of radio buttons to a database. If you absolutely *have* to define the T/F value for a checkbox, it could be simplified as:[Append ...]CheckBox1=[ShowIf [CheckBox1]!T]F[/ShowIf][ShowIf [CheckBox1]=T]T[/ShowIf]&CheckBox2=[ShowIf [CheckBox2]!T]F[/ShowIf][ShowIf [CheckBox2]=T]T[/ShowIf][/Append]... resulting in far fewer [raw][variable][/raw] tags which, imho, makes it easier to track -- but I'd agree that it's still a drag : )Another way to consider would be to just do:[Append ...]CheckBox1=[CheckBox1]&CheckBox2=[CheckBox2][/Append]Then, when it comes time to use that information to repopulate a form, or cause some action to occur, just think of it as if the value is 'T' it's true, if it's anything else, it's false.Keeping in mind Grant's recent emphatic closure of the whole default value of undeclared variables subject, I'm *not* getting into *that* whole can of worms again! ; )Rob MarquardtDesigner/Resident WireheadToast Design300 First Avenue North, Suite 150Minneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com
Associated Messages, from the most recent to the oldest:
On 10/15/98 4:57 PM, Dave MacLeay so noted...>A simple example would be a form with several checkboxes. Currently there>is a lot of code out there that deals with it like this:>> [Append ...]CheckBox1=[ShowIf>[CheckBox1]=
[raw][CheckBox1][/raw]]F[/ShowIf][HideIf>[CheckBox1]=
[raw][CheckBox1][/raw]][CheckBox1]&CheckBox2=[ShowIf>[CheckBox2]=
[raw][CheckBox2][/raw]]F[/ShowIf][HideIf>[CheckBox2]=
[raw][CheckBox2][/raw]][CheckBox2][/Append]>>Every time you want to use a checkbox value, you have to go through the>whole
[showif]/
[hideif] routine again. What a drag.I had mentioned something to this effect last week on the subject of adding the information from a large number of radio buttons to a database. If you absolutely *have* to define the T/F value for a checkbox, it could be simplified as:[Append ...]CheckBox1=[ShowIf [CheckBox1]!T]F[/ShowIf][ShowIf [CheckBox1]=T]T[/ShowIf]&CheckBox2=[ShowIf [CheckBox2]!T]F[/ShowIf][ShowIf [CheckBox2]=T]T[/ShowIf][/Append]... resulting in far fewer
[raw][variable][/raw] tags which, imho, makes it easier to track -- but I'd agree that it's still a drag : )Another way to consider would be to just do:[Append ...]CheckBox1=[CheckBox1]&CheckBox2=[CheckBox2][/Append]Then, when it comes time to use that information to repopulate a form, or cause some action to occur, just think of it as if the value is 'T' it's true, if it's anything else, it's false.Keeping in mind Grant's recent emphatic closure of the whole default value of undeclared variables subject, I'm *not* getting into *that* whole can of worms again! ; )Rob MarquardtDesigner/Resident WireheadToast Design300 First Avenue North, Suite 150Minneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com
Rob Marquardt
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:
Stumped on ShowNext -using variables (1997)
Multi-processor Mac info ... (1997)
email server and webdna (2006)
setitems, one more thing (1997)
Anybody using PayFlow Pro on OSX? (2004)
Emailer setup (1997)
RE: Problems reading files created by WC (1997)
old mail...problem with listserv? (1998)
RE: too many nested [xxx] (1997)
Re[3]: 2nd WebCatalog2 Feature Request (1996)
Help! WebCat2 bug (1997)
WebDNA on Fedora 5 -Apache won't start (2006)
os x server (2000)
FEA REQ: One .hdr, multiple .db's (2003)
cybercash on OSX - was Executing remote AppleScript (2000)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
Banner DNA (1997)
Filemaker & WebCat (2001)
math a various prices (1997)
Solution: Replace/Commit not Replacing/Commiting (2000)