RE: bad because that means I have to kludge the detection of arguments if I want to keep the cfargument statements around for documentation and type/presence enforcement.
Try this for string argument detection:
<cfif len(arguments.userName)>where username=#arguments.username#</cfif>
Or if you really want to:
<cfif structKeyExists(arguments, "userName") and len(arguments.userName)>where username=#arguments.username#</cfif>
This way you check for the existing of the argument && not being set to the default value.
Either way, I believe this'll make the block of code you sent work + you can keep the cfargument tags.
-----Original Message-----
From: Howard Fore [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 01, 2003 12:55 PM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] Detecting arguments passed by CFINVOKEARGUMENT?
On Tuesday, April 1, 2003, at 03:35 PM, Suyer, Ed [PRD Non-J&J] wrote:
> Do you still see this symptom�if you remove these lines of code from
> inside your function?
> �
>
> <cfargument name="UserName" type="string" required="false">
>
> <cfargument name="Password" type="string" required="false">
>
> <cfargument name="StudentNumber" type="string" required="false">
>
> <cfargument name="StudentSequence" type="numeric" required="false"
> default="0">
>
Bingo! When I remove the cfargument tags from the cffunction, they are
no longer in the arguments struct that's passed out to cfdump. Which is
good and bad. Good because the behavior is predictable, but bad because
that means I have to kludge the detection of arguments if I want to
keep the cfargument statements around for documentation and
type/presence enforcement.
Thanks for the help!
--
Howard Fore, [EMAIL PROTECTED]
"Perception is reality; please make sure your perception isn't the
product of a designed reality"
----------------------------------------------------------
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).
