Say for example I have the following CFC called test.cfc:
<cfcomponent>
<cfset init()>
<cffunction name="init" access="public" output="no"
returntype="test">
<cfargument name="cartID" type="numeric" required="yes"
>
<cfset variables.cartID = arguments.cartID>
<cfreturn this>
</cffunction>
</cfcomponent>
...and I have the following CFM file that calls
it.....test.cfm.....
<cfobject component="test" name="comp">
<cfset comp.init(6)>
<cfdump var="#comp.init(6)#">
This will cause an error saying the parameter cartID to
function init() was required but not passed in, because the
constructor call ( <cfset init()> ) does not pass a parameter
to the init function. The only way I can get this to work is to
comment out the <cfset init()> line. I guess I don't need
this in my scenario because I'm calling the init method directly
anyway.
FYI: I've been following Ben Fortas phone selector example (
a good example of building a simple Flex/CF app):
http://www.adobe.com/devnet/flex/articles/coldfusionflex_part3_02.html