+1 for Cameron's approach. I use that construct in lots of places internally to create value objects with default values for keys that weren't passed.
Dave Merrill On Fri, Dec 7, 2012 at 9:42 AM, Cameron Childress <camer...@gmail.com>wrote: > > On Wed, Dec 5, 2012 at 6:50 PM, Chris Velevitch > <chris.velevi...@gmail.com>wrote: > > > How would you design that function to handle the fact that some > > clients are NOT passing the new field and there's no need to change > > the clients as it's optional? > > > I typically handle this in a CFC function using defaults for non-required > arguments. IE: > > <cffunction name="myFunction"> > <cfargument name="varone" required="true" /> > <cfargument name="clientspecificvar" default="" /> > > In your specific case, I'd probably abstract out the stored proc call into > it's own function with it's own named arguments. > > -Cameron > > -- > Cameron Childress > -- > p: 678.637.5072 > im: cameroncf > facebook <http://www.facebook.com/cameroncf> | > twitter<http://twitter.com/cameronc> | > google+ <https://profiles.google.com/u/0/117829379451708140985> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353413 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm