The problem that I have had with IsDefined on nested structures such as arguments.x.y 
is that IsDefined("arguments.x.y") will throw an error if x or y is the empty string 
(or not strings) because that is not a valid struct key name.

You may have to do something like (x NEQ "" and y NEQ "" and 
IsDefined("arguments.x.y").

If x and y are nonempty strings, then I believe IsDefined("arguments.x.y") should work 
as expected.

Not sure if that is the problem you are seeing, though.

Jon

>>> [EMAIL PROTECTED] 10/21/03 11:31 AM >>>
I think the error is on the IsDefined("arguments.x.y")

You may have to use something like structKeyExists(arguments.x, "y")
instead.

-Nelson

----- Original Message ----- 
From: "Douglas Humphris" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 21, 2003 12:03 PM
Subject: [CFCDev] Short circuiting??


If I have this line (I don't really use x and y):

<cfif IsDefined("arguments.x.y") AND ListLen(arguments.x.y)>

then I get this error message in my CFC (CFMX6.1) pointing to the line
above:

"Element x.y is undefined in ARGUMENTS."

I thought CF used short-circuiting - it does elsewhere, why not here?
Can anyone confirm that I have to change the line to:

<cfif IsDefined("arguments.x.y")>
<cfif ListLen(arguments.x.y)>


Thanks,
Douglas

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[EMAIL PROTECTED]

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to