I tried this (with CF8):

<cfset myStruct = StructNew()/>
<cfset myStruct.key1 = "Hello"/>
<cfset myStruct.key2 = JavaCast("null", "")/>
<cfset myStruct["key3"] = JavaCast("null", "")/>
<cfset myStruct.put( "key4", JavaCast("null", ""))/>

<cfoutput>
        Key1 Exists: #StructKeyExists(myStruct, "key1")#<br/>
        Key2 Exists: #StructKeyExists(myStruct, "key2")#<br/>
        Key3 Exists: #StructKeyExists(myStruct, "key3")#<br/>
        Key4 Exists: #StructKeyExists(myStruct, "key4")#<br/>
        Keys: #StructKeyList(myStruct)#<br/>
</cfoutput>

Output:
Key1 Exists: YES
Key2 Exists: NO
Key3 Exists: NO
Key4 Exists: NO
Keys: KEY1,KEY2,key3,key4

So, the StructKeyExists() does not return "true" if the value is null
(at least not with CF8)
BUT, as you can see, the StructKeyList does indeed list the all the
Keys regardless of their corresponding value. So maybe CF less then 8
behaves differently.


/Max

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to