> Oh gee...you can overrite methods too!  I didn't know that.

On a similar line, I've used the "attaching a function to a CFC" to
allow use of Nathan Dintenfass' "CFC Remote Documentor"
(http://www.changemedia.org/cfcremotedocumenter/) with any CFC, without
having to put <cfinclude template="cfcremotedocumenter.cfm"> in every
CFC.

I have a file called autodoc.cfm which take a single url parameter of
"object" (the CFC name) and outputs the docs (similar to the standard
CFC doc browser, but much pettier!).  It has the following in (no error
handling, just quick and dirty):

<!--- include documentor functions --->
<cfinclude template="cfcremotedocumenter.cfm">

<cfscript>
    // get an instance of the appropriate object
    obj = createobject("component", url.object");

    // dynamically attach the appropriate functions
    obj.getDocumentation = getDocumentation;
    obj.cfcDocumenter_getAllData = cfcDocumenter_getAllData;
    obj.cfcDocumenter_getHierarchy = cfcDocumenter_getHierarchy;
    obj.cfcDocumenter_getProperties = cfcDocumenter_getProperties;
    obj.cfcDocumenter_getFunctions = cfcDocumenter_getFunctions;
    obj.cfcDocumenter_parameterSummaryFormat =
cfcDocumenter_parameterSummaryFormat;
</cfscript>

<!--- call the doc method --->
<cfoutput>#variables.obj.getDocumentation()#</cfoutput>



-------------------------------------------------------
RAWNET LTD - Internet, New Media and ebusiness Gurus.
Visit our new website at http://www.rawnet.com for
more information about our company, or call us free
anytime on 0800 294 24 24.
-------------------------------------------------------
Tim Blair
Web Application Engineer, Rawnet Limited
Direct Phone : +44 (0) 1344 393 441
Switchboard : +44 (0) 1344 393 040
-------------------------------------------------------
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
-------------------------------------------------------


----------------------------------------------------------
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).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to