Thanks, Paul I've done it a few times by accident. It seems like I've done it on purpose before, too, but I can't remember when, where or why. Sorry about that. It seems like it had something to do with making it easier to get to the data when traversing a deep structure. What is hashcode()? I don't see any documentation for that. It looks like it returns a big number; what good is that?
My main reason for wanting an alternative to cfdump is to reduce the amount of html that is output by cfdump. When I dump a large structure, it uses too much browser memory. I just thought that while I was at it I might as well avoid the endless loop feature of cfdump... -----Original Message----- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 2:22 PM To: [EMAIL PROTECTED] Subject: RE: [CFCDev] cfdump problem You'd have to maintain a list of all the variables you visit, and see if each variable is listed before outputting it. I'm not sure exactly what you could use to track each unique object. the hashCode() method would work, but it could possibly result in variables being hidden. Probably your best bet. Also, you'd have to come up with some nice way of indicating that a variable has already been processed in the output, and reference what variable it is recusrively refering to. Of course, this begs the question, why do you have a recursive structure such as that? Nothing jumps into my mind as a good reason to do that, unless you're using the structs to build a graph of some kind. barneyb --- Barney Boisvert, Senior Development Engineer AudienceCentral [EMAIL PROTECTED] voice : 360.756.8080 x12 fax : 360.647.5351 www.audiencecentral.com > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Brad Howerter > Sent: Thursday, August 21, 2003 1:05 PM > To: '[EMAIL PROTECTED]' > Subject: [CFCDev] cfdump problem > > > I'd like to write a replacement for cfdump that doesn't enter an endless > loop if it encounters a recursive structure. Is that possible? > How would I > know whether I've encountered a structure before? Here's an > example of some > code that will cause cfdump to recursively loop until your page times out: > > <cfset st = structNew()> > <cfset st.abc = st> > <cfdump var=#st#> > > ---------------------------------------------------------- > 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). > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003 ---------------------------------------------------------- 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). ---------------------------------------------------------- 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).
