Don't use isDefined. Use StructKeyExists()
<cfif structKeyExists(aStruct,aField)>
dont step on my blue suede shoes
</cfif>
=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia
Email : [EMAIL PROTECTED]
Yahoo IM : morpheus
"My ally is the Force, and a powerful ally it is." - Yoda
> -----Original Message-----
> From: cf refactoring [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 18, 2002 11:50 AM
> To: CF-Talk
> Subject: IsDefined and brackets
>
>
> The following code throws a syntax error:
>
> <cfset aStruct=StructNew()>
> <cfset aStruct.aField="something">
> <cfif IsDefined("aStruct[aField]")>
> aStruct[aField] is defined
> </cfif>
>
> Is this just some CF quirk that IsDefined doesn't like
> brackets or is there some good reason for this?
>
> =====
> I-Lin Kuo
> Macromedia CF5 Advanced Developer
> Sun Certified Java 2 Programmer
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
>
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.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