I'm not sure if this is also an "known issue", but thought it worthy of
mention, just in case.

Consider this code:

<!--- PARENT.CFC --->
<cfcomponent hint="parent component">
        <cffunction name="f1">
                <cfreturn "f1 parent">
        </cffunction>

        <cffunction name="f2">
                <cfreturn "f2 parent">
        </cffunction>
</cfcomponent>

<!--- CHILD.CFC --->
<cfcomponent hint="child component" extends="parent">
        <cffunction name="f1">
                <cfreturn "f1 child">
        </cffunction>

        <cfinclude template="inc.cfm">
</cfcomponent>

<!--- INC.CFM --->
<cffunction name="f2">
        <cfreturn "f2 include">
</cffunction>

This will error with:

<quote>
Routines cannot be declared more than once.  
The routine "f2" has been declared twice in different templates.  
  
ColdFusion cannot determine the line of the template that caused this
error. This is often caused by an error in the exception handling
subsystem.  
</quote>


I'm guessing CF is considering the included method as a UDF rather than
an integral component method, in which case is completely valid in the
child.cfc as an overloading of the same-named method in the parent.cfc.

Anyway... Worth knowing about.

Adam

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words '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