Allan and Ian that is quite helpful.
I am wondering, should I use the variable scope within my component? I
have seen several variations to this as well:
<cfargument name="name" type="string" required="false" default="">
#arguments.name#
<cfparam name="variables.name" type="string" default="">
#variables.name#
And in the pseudo-constructor, I have seen this:
<cfset this.name = variables.name>
<cfset this.name = arguments.name>
<cfparam name="this.name" type="string" default="">
Thanks for helping me clear away the confusion, I am pretty bogged
down with all of these nuances at present.
-Aaron
On 2/16/06, Alan Rother <[EMAIL PROTECTED]> wrote:
> If you have many args to pass in, I do it like this
>
> <cfscript>
> //instantiate the component
> newJob = createObject("component","job");
> //create the arg structure
> variables.args = StructNew();
> //assign the args
> variables.args.Val1 = Form.Field1;
> variables.args.Val2 = Form.Field2;
> variables.args.Val3 = Form.Field3;
> variables.args.Val4 = Form.Field4;
> variables.args.Val5 = Form.Field5;
> variables.args.Val6 = Form.Field6;
> variables.args.Val7 = Form.Field7;
> //call the method and pass in the arg collection
> newJob.insertJob(argumentCollection=variables.args);
> </cfscript>
>
>
> HTH
>
> --
> Alan Rother
> Macromedia Certified Advanced ColdFusion MX 7 Developer
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232643
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54