That's strange, I was getting hashCode() values for structures when I wrote
the dumpstruct tag at work, but now I'm getting 0's at home (both CFMX 6.1).
Anyways, this code should always work, it's just a little slower (fine for
cfdump replacement).
<cfscript>
s = "my String";
writeoutput(s.hashCode() & "<br />");
d = 0.454;
writeoutput(d.hashCode() & "<br />");
st = structNew();
st['s'] = s;
writeoutput(structHashCode(st) & "<br />");
st['d'] = d;
writeoutput(structHashCode(st) & "<br />");
function structHashCode(st) {
return createObject("java", "java.util.Hashtable").init(st).hashCode();
}
</cfscript>
HTH,
Sam
----------------------------------------------
Blog: http://www.rewindlife.com
Chart: http://www.blinex.com/products/charting
----------------------------------------------
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Davis, Eric
> Sent: Friday, August 22, 2003 4:54 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: [CFCDev] cfdump problem
>
> CFMX 6.1
>
> Yes, indeed, it does display zero for each structure's hashcode().
>
> --
> Eric C. Davis
----------------------------------------------------------
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).