RE: cfargument and dot notaion

2002-08-01 Thread Raymond Camden

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]


   
 
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: cfargument and dot notaion

2002-08-01 Thread Kreig Zimmerman

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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfargument and dot notaion

2002-08-01 Thread Raymond Camden

It's not CFCs per se, but cffunction. So it applies to tag based UDFs as
well - don't forget cffunction can be used outside of CFCs.

===
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 12:15 PM
 To: CF-Talk
 Subject: Re: cfargument and dot notaion
 
 
 That's what I thought.  Oh well then.
 
 Good thing that CFCs don't behave this way.
   - Original Message - 
   From: Raymond Camden 
   To: CF-Talk 
   Sent: Thursday, August 01, 2002 12:08 PM
   Subject: RE: cfargument and dot notaion
 
 
   No, because in script based UDFs, if you list them, they 
 are required.
   If you want to use optional args in script based UDFs, you 
 can't have
   them between the parens.
 
   
 ==
 =
   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 12:02 PM
To: CF-Talk
Subject: Re: cfargument and dot notaion


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

Re: cfargument and dot notaion

2002-08-01 Thread Kreig Zimmerman

Yes, yes I understand.  I meant CFFunction, not CFCs per se.
  - Original Message - 
  From: Raymond Camden 
  To: CF-Talk 
  Sent: Thursday, August 01, 2002 12:24 PM
  Subject: RE: cfargument and dot notaion


  It's not CFCs per se, but cffunction. So it applies to tag based UDFs as
  well - don't forget cffunction can be used outside of CFCs.

  ===
  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 12:15 PM
   To: CF-Talk
   Subject: Re: cfargument and dot notaion
   
   
   That's what I thought.  Oh well then.
   
   Good thing that CFCs don't behave this way.
 - Original Message - 
 From: Raymond Camden 
 To: CF-Talk 
 Sent: Thursday, August 01, 2002 12:08 PM
 Subject: RE: cfargument and dot notaion
   
   
 No, because in script based UDFs, if you list them, they 
   are required.
 If you want to use optional args in script based UDFs, you 
   can't have
 them between the parens.
   
 
   ==
   =
 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 12:02 PM
  To: CF-Talk
  Subject: Re: cfargument and dot notaion
  
  
  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

RE: cfargument and dot notaion

2002-07-31 Thread Raymond Camden

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]
 
 
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists