> 2. Having to maintain the proper order of argument declaration was a pain
> in the neck.

You can pass arguments by name when calling UDFs and component methods using
the dotted syntax:

  <cfset myObject = createObject("component", "test")>

  <cfset result = myObject.sayHello(message="Hello", name="ben")>

When naming your arguments, order is not important. In fact, you can build a
collection of arguments and pass them in:

  <cfset myObject = createObject("component", "test")>
  
  <cfset args = structNew()>

  <cfset args.message = "Hello">
  
  <cfset args.name = "World">

  <cfset result = myObject.sayHello(argumentCollection=args)>

Ben Rogers
http://www.c4.net
v.508.240.0051
f.508.240.0057


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185592
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

Reply via email to