No...

I mean that in a UDF such as:

function HopeThisWorks (arg1, arg2, arg3) {


..is specifying the arguments enough to initialize the corresponding variables?

In other words, after creating said UDF, would the call 
HopeThisWorks(arg3="CrossFingers") be enough, without paraming the other arguments 
within the UDF's body?  Or would the UDF crash and burn if the arguments were not 
paramed somehow within the UDF's body?
  ----- Original Message ----- 
  From: Raymond Camden 
  To: CF-Talk 
  Sent: Thursday, August 01, 2002 11:42 AM
  Subject: RE: cfargument and dot notaion


  You mean how do dynamically pass crap to a UDF? Like attributeCollection
  in custom tags? Use argumentCollection:

  <cfset a = structNew()>
  <cfset a.foo = 1>

  <cfset res = myUDF(argumentCollection=a)>

  That should work.

  =======================================================================
  Raymond Camden, ColdFusion Jedi Master for Macromedia

  Email    : [EMAIL PROTECTED]
  Yahoo IM : morpheus

  "My ally is the Force, and a powerful ally it is." - Yoda 

  > -----Original Message-----
  > From: Kreig Zimmerman [mailto:[EMAIL PROTECTED]] 
  > Sent: Thursday, August 01, 2002 11:34 AM
  > To: CF-Talk
  > Subject: Re: cfargument and dot notaion
  > 
  > 
  > How do we param out arguments in a UDF then?
  >   ----- Original Message ----- 
  >   From: Raymond Camden 
  >   To: CF-Talk 
  >   Sent: Wednesday, July 31, 2002 5:12 PM
  >   Subject: RE: cfargument and dot notaion
  > 
  > 
  >   Yes, the order of args must match the order of cfarg tags.
  > 
  >   Unless...
  > 
  >   You use the new name/value pair notation, which works w/ 
  > UDFs as well:
  > 
  >   <cfset x = myUDForCFCMethod(arg=1,arg2=2,arg4=4,arg3=3)>
  > 
  >   
  > ==============================================================
  > =========
  >   Raymond Camden, ColdFusion Jedi Master for Macromedia
  > 
  >   Email    : [EMAIL PROTECTED]
  >   Yahoo IM : morpheus
  > 
  >   "My ally is the Force, and a powerful ally it is." - Yoda 
  > 
  >   > -----Original Message-----
  >   > From: Jon Hall [mailto:[EMAIL PROTECTED]] 
  >   > Sent: Wednesday, July 31, 2002 5:07 PM
  >   > To: CF-Talk
  >   > Subject: cfargument and dot notaion
  >   > 
  >   > 
  >   >   When calling a cfc method using the dot notation, the 
  > order of the
  >   >   arguments given to the method must match the order of 
  > the cfargument
  >   >   tags in the body of the method, unlike cfinvoke, where 
  > you have name
  >   >   value pairs.
  >   >   
  >   >   Example:
  >   >   <cfset objEmailMan = createObject("component", "emailman")>
  >   >   <cfset isDupe = 
  >   > objEmailMan.isDupe(trim(singleAddress),emailCategoryID)>
  >   > 
  >   >   -- emailman.cfc --
  >   >   <cffunction name="isDupe" returntype="boolean">
  >   >       <cfargument name="emailAddress" required="Yes" 
  > type="string">
  >   >       <cfargument name="emailCategoryID" required="Yes" 
  >   > type="numeric">
  >   >       <snip...>
  >   >       
  >   >   Is this correct? It seems to be so, but I can't find anything
  >   >   anywhere that comes out and says it is the order that matters.
  >   >     
  >   > -- 
  >   >  Jon
  >   >   mailto:[EMAIL PROTECTED]
  >   > 
  >   > 
  >   
  > 
  
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to