On Wed, Sep 1, 2010 at 5:56 PM, Rick Root <rick.r...@gmail.com> wrote:
> > Personally I like to <cfparam> things that I know are supposed to > exist, and I will go both ways on page variables that may or may not > exist. > > I prefer to param it and then test for a valid value than to test for > isDefined() > > Yup, and you can throw all of them at the top of the script. I'm not saying there isn't times you need to use StructKeyExists. Readability is by far my biggest goal, the faster I can read though a script, the less hassles I have with it as a whole, and cfparam allows you to use a built in function to assist in setting up page variables. Not saying there arn't times you should use StuctKeyExists, but if it was a param to begin with, you already know the default value; That coupled with StructKeyExists is a pain to type! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336745 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm