I'll answer that one - even though it is not my script.....
Because then you can catch the output in a variable (returned from the function) and then put it anywhere on your page (or even in a hidden DIV that you can show or hide with a mouse click). Then it doesn't trash the design of your page.
We never write any output directly to anything now - catching it a <savecontent> block lets us position it anywhere - separating layout from the the content.
Regards,
Gary Menzel
On 7/21/05, Bill Rawlinson <[EMAIL PROTECTED]> wrote:
Just out of curiosity why do it via savecontent?
Why not just:
<cffunction name="dump" access="public" output="true">
<cfargument name="abort" type="boolean" default="false">
<cfdump var="#variables#">
<cfif arguments.abort>
<cfabort>
</cfif>
</cffunction>
On 7/21/05, Jared Rypka-Hauer - CMG, LLC <[EMAIL PROTECTED]> wrote:
> Don't know if it was me or not, but I do this all the time...
>
> <cffunction name="dump" access="public" output="false">
> <cfset var returnVar = "">
> <cfsavecontent var="returnVar"><cfdump var="#variables#" /></cfsavecontent>
> <cfreturn returnVar />
> </cffunction>
>
> Works really well to see what's ended up where inside the CFC instance. It
> has the additional value of dumping variables and THIS in separate scopes so
> you can visually compare public and private data. Personally I like the fact
> that it gracefully returns data from the CFC instead of dumping data to the
> output buffer from within the CFC.
>
> Laterz!
>
> J
>
>
> On 7/20/05, Nolan Erck < [EMAIL PROTECTED]> wrote:
> > Somebody else had this suggestion a while ago, but I can't remember who.
> >
> > What I've started doing is, writing a method in your CFC like so:
> >
> > <cffunction name="dumpThis" output="true">
> > <cfdump var="#Variables#">
> > </cffunction>
> >
> > and call that from a test page. Any un-scoped variables will be part of
> > the Variables scope, and will appear on the screen. You can then make
> > your changes to the CFC and try again. Of course this would be a bit
> > tedious if you have a huge CFC with dozens of variables, but it gets the
> > job done.
> >
> > Hth.
> >
> >
> > Nolan Erck
> > Web Developer/Programmer
> > Schools Financial Credit Union
> > (916) 569-5409 Office
> > (916) 569-2024 Fax
> > www.schools.org
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On
> > Behalf Of Peter H
> > Sent: Wednesday, July 20, 2005 6:24 AM
> > To: [email protected]
> > Subject: [CFCDev] Ensuring all local variables are var scoped
> >
> > Hi guys,
> >
> > Is there a way to test that all local variables in a method have been
> > var
> > scoped?
> >
> > For the most part I've create a Local pseudo-scope and have been pretty
> > careful about using it but it would make me feel a lot more comfortable
> > if
> > could test it to be sure.
> >
> > Cheers, Pete
> >
> >
> _________________________________________________________________
> > Be the first to hear what's new at MSN - sign up to our free
> > newsletters!
> > http://www.msn.co.uk/newsletters
> >
> >
> >
> >
> ----------------------------------------------------------
> > You are subscribed to cfcdev. To unsubscribe, send an email to
> > [email protected] with the words 'unsubscribe cfcdev' as the subject of
> > the email.
> >
> > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
> > (www.cfxhosting.com).
> >
> > CFCDev is supported by New Atlanta, makers of BlueDragon
> > http://www.newatlanta.com/products/bluedragon/index.cfm
> >
> > An archive of the CFCDev list is available at
> > www.mail-archive.com/[email protected]
> >
> >
> >
> >
> > The information contained in this e-mail is confidential and may contain
> privileged information exempt from disclosure under applicable law. The
> information is intended only for the use of the individual or entity to
> which it is addressed. If you are not the intended recipient, employee, or
> agent responsible to deliver it to the intended recipient, you are hereby
> notified that any use, dissemination, distribution, or copying of this
> communication is strictly prohibited. If you have received this e-mail in
> error, please delete the message from your computer and immediately notify
> the sender by telephone (you may call collect) at 916-569-5400 or by e-mail
> to [EMAIL PROTECTED]. Thank you.
> >
> >
> >
> ----------------------------------------------------------
> > You are subscribed to cfcdev. To unsubscribe, send an email to
> [email protected] with the words 'unsubscribe cfcdev' as the subject of the
> email.
> >
> > CFCDev is run by CFCZone ( www.cfczone.org) and supported by CFXHosting
> (www.cfxhosting.com).
> >
> > CFCDev is supported by New Atlanta, makers of BlueDragon
> > http://www.newatlanta.com/products/bluedragon/index.cfm
> >
> > An archive of the CFCDev list is available at
> www.mail-archive.com/[email protected]
> >
> >
> >
>
>
>
> --
> ---------------
> -------------------------------------
> Buy SQLSurveyor!
> http://www.web-relevant.com/sqlsurveyor
> Never make your developers open Enterprise Manager again.
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email to
> [email protected] with the words 'unsubscribe cfcdev' as the subject of the
> email.
>
> CFCDev is run by CFCZone (www.cfczone.org ) and supported by CFXHosting
> (www.cfxhosting.com).
>
> CFCDev is supported by New Atlanta, makers of BlueDragon
> http://www.newatlanta.com/products/bluedragon/index.cfm
>
> An archive of the CFCDev list is available at
> www.mail-archive.com/[email protected]
--
[EMAIL PROTECTED]
http://blog.rawlinson.us
If you want Gmail - just ask.
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone ( www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
