RE: cfset or cfparam in cfc?

2005-03-08 Thread Michael Dinowitz
Which is why I said you can do it with a function. :) So can you ask someone at MM why the validation attributes were not added to the CFARGUMENT tag and if they can be? > On Tue, 8 Mar 2005 16:25:43 -0500, Michael Dinowitz > <[EMAIL PROTECTED]> wrote: > > I've told people in the past to use CFPAR

Re: cfset or cfparam in cfc?

2005-03-08 Thread Sean Corfield
On Tue, 8 Mar 2005 16:25:43 -0500, Michael Dinowitz <[EMAIL PROTECTED]> wrote: > I've told people in the past to use CFPARAM to validate the structure of > their data within a CFC method as a fast 'check'. With CFMX 7 I'd be more inclined to use the isValid() function instead of - a lot depends o

RE: cfset or cfparam in cfc?

2005-03-08 Thread Michael Dinowitz
CFARGUMENT can validate the data type being passed in and if it exists (as well as give a default value). This copies most of the ability of the CFPARAM tag. On the other hand, the new validation ability of CFPARAM does not exist in CFARGUMENT (oversight?). Of course, you can write the same using

Re: cfset or cfparam in cfc?

2005-03-08 Thread Paul Kenney
Really, I don't think that cfparam is as useful inside CFC methods as it is inside CFM files.I have mostly used to "declare" attributes to a custom tag or input values to an included file. It makes sure that required variables exist, and for those that aren't required it can set default value

RE: cfset or cfparam in cfc?

2005-03-08 Thread Michael Dinowitz
Yes. Any time a variable is set inside a CFC method, it should have the var keyword unless you WANT it to be available to other methods in the CFC (i.e. you want it to be in the CFC wide variables scope). This goes for CFPARAM, CFQUERY, and every (every) other location where a variable is set. My