cfargument name=descriptlistArray type=array required=false
default=
Why specify a default? If it isn't required, use
'isDefined()' inside the
function.
What's happening is that the call omits the argument so CF
sets it to the
default you specified, as if the user passed that
On Saturday, August 17, 2002, at 06:40 , Raymond Camden wrote:
What is wrong with using the default? Yes, if you need more complex
initialization, you would use isDefined, but if you just want to init
the value to a blank array, the default is a valid way to do so.
Yes, if
I have a cfc which has the following argument. The problem is that if I do
not pass it an array it throws an error that the value is not an array. How
do I make it optional to pass a value to this method?
cfargument name=descriptlistArray type=array required=false default=
Brook Davies
: cfcomponents and required complex values
I have a cfc which has the following argument. The problem is
that if I do
not pass it an array it throws an error that the value is not
an array. How
do I make it optional to pass a value to this method?
cfargument name=descriptlistArray type
You could do a type=any and test the data type later. That's how
I've been faking overloading.
cfargument name=descriptlistArray type=any required=false
cfif isArray(arguments.descriptlistArray)
..
--
jon
mailto:[EMAIL PROTECTED]
Friday, August 16, 2002, 12:35:46 PM, you wrote:
BD I have a
You can omit the type descriptor entirely, if you need to.
-Original Message-
From: Brook Davies [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 16, 2002 12:36 PM
To: CF-Talk
Subject: cfcomponents and required complex values
I have a cfc which has the following argument. The problem
is the Force, and a powerful ally it is. - Yoda
-Original Message-
From: Brook Davies [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 16, 2002 12:36 PM
To: CF-Talk
Subject: cfcomponents and required complex values
I have a cfc which has the following argument. The problem
On Friday, August 16, 2002, at 09:35 , Brook Davies wrote:
I have a cfc which has the following argument. The problem is that if I do
not pass it an array it throws an error that the value is not an array.
How
do I make it optional to pass a value to this method?
cfargument
8 matches
Mail list logo