Got it you guys,
 
I had the path name incorrectly pointed...derr...below is the correct path name...Thanks everyone!!
 
<cfcomponent extends="Web_Test_2.Web_Can.Core_CFC.comp_Name">
 <cffunction name="DisplayName" access="public" returntype="string">
  <cfset myResult="Jeremy">
  <cfreturn myResult>
 </cffunction>
</cfcomponent>
"gary menzel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]...

I have another question or two.....

When you say "what does the inheriting component look like" - what do you mean ?

The code you have presented is basically "right" in terms of inheriting CFC's.  If you now call the "menu" method in the derived class, it should result in the parent class method being called (because you have not defined an override in the child class - because it is commented out).  If you comment out the derived classes "menu" method, then this would be called instead.

What are you wanting the relationship to do?

NOTE: There is no "super class" calling ability in CFC's (that I can find).  This means you can't override a method in a child class and then call the original method back in the parent from the overriding method.

If anyone out there can contradict me on this, I would be happy.  The only mechanism I can see of doing this is to use a unique naming convention in ancestor classes, then create "shell" calls that you override, and then you can call the "base" class method using the unique names.  To add additional protection to these ancestor methods, you would set their ACCESS to PACKAGE and then place all inheriting classes in the same directory (package) as the ancestor class (components outside of the directory cannot access methods with the PACKAGE access).  And if you want an overridable method that does NOT allow access to the base class implementation, then set the ACCESS to PRIVATE but still call it from the "shell" method.



Gary Menzel
IT Operations Brisbane -+- ABN AMRO Morgans Limited
Level 29, 123 Eagle Street BRISBANE QLD 4000
PH: 07 333 44 828  FX:  07 3834 0828


[EMAIL PROTECTED] wrote on 03/28/2003 08:06:59 AM:

> Hi Tim,
>
> Doah!!
>
> For got the rest of the code.... I know that there are comments but that is
> what its suppose to do....
> and yes its mainly for debuging...
>
>
> <cfcomponent extends="Comp_Menu">
>  <!--- <cffunction access="remote"    name="Menu"    output="true"
>    returntype="query"    displayname="Menu"    hint="Menu Page">
>    <cfquery name="testQuery" datasource="northwind">    SELECT *
>    FROM   customers    </cfquery>    <cfoutput
> query="TestQuery">Custom #TestQuery.ContactName#<br></cfoutput>    
> <cfreturn testQuery> </cffunction> --->
> </cfcomponent>
> "Tim McAuliffe" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > Hi Jeremy,
> >
> > What's the component that does the inheritance look like? You just posted
> > the 'core' code. Also, any reason why you're doing a <cfoutput> in this
> > component. Is it just for debugging purposes?
> >
> > Cheers
> >
> > Tim
> >
> > "Jeremy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> > >
> > > Hey,
> > >
> > > Got a question...and I'm stuck...
> > >
> > > I have a CFC which uses inheritance. I use the first part of the code as
> > the
> > > "Core" and the second part of the code as "Custom" And its not working.
> > > Below is the code:
> > >
> > >
> > > CORE
> > > <cfcomponent>
> > >  <cffunction access="remote"
> > >     name="Menu"
> > >     output="true"
> > >     returntype="query"
> > >     displayname="Menu"
> > >     hint="Menu Page">
> > >
> > >     <cfquery name="testQuery" datasource="northwind">
> > >     SELECT *
> > >     FROM   customers
> > >     </cfquery>
> > >
> > >     <cfoutput
> query="TestQuery">BLA#TestQuery.ContactName#<br></cfoutput>
> > >     <cfreturn testQuery>
> > >  </cffunction>
> > > </cfcomponent>
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
>
> MX Downunder AsiaPac DevCon - http://mxdu.com/
****************************************************************************
If this communication is not intended for you and you are not an authorised
recipient of this email you are prohibited by law from dealing with or
relying on the email or any file attachments. This prohibition includes
reading, printing, copying, re-transmitting, disseminating, storing or in
any other way dealing or acting in reliance on the information. If you
have received this email in error, we request you contact ABN AMRO Morgans
Limited immediately by returning the email to [EMAIL PROTECTED]
and destroy the original. We will refund any reasonable costs associated
with notifying ABN AMRO Morgans. This email is confidential and may contain
privileged client information. ABN AMRO Morgans has taken reasonable steps
to ensure the accuracy and integrity of all its communications, including
electronic communications, but accepts no liability for materials
transmitted. Materials may also be transmitted without the knowledge of ABN
AMRO Morgans. ABN AMRO Morgans Limited its directors and employees do not
accept liability for the results of any actions taken or not on the basis
of the information in this report. ABN AMRO Morgans Limited and its
associates hold or may hold securities in the companies/trusts mentioned
herein. Any recommendation is made on the basis of our research of the
investment and may not suit the specific requirements of clients.
Assessments of suitability to an individual's portfolio can only be made
after an examination of the particular client's investments, financial
circumstances and requirements.
****************************************************************************
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to