There is no best way - it simply depends on what you are trying to do. I know that isn't an answer, but it's the truth. Things to consider:
1) If the inherited method is what you want to call, then just call it! <cfset foo = myCFC.inheritedMethod(....)> 2) If the method in the child component needs to call it - then you would simply call the method in the child component and let it call the parent's method. 3) As for your #3, yes, methods in child components override methods in parent components. ======================================================================= Raymond Camden, ColdFusion Jedi Master for Macromedia Email : [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: Phillip Cave [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 26, 2002 10:24 PM > To: CF-Talk > Subject: calling inherited methods > > > what is the best practice when calling inherited methods? say > i have basic 'content' component with a addContent() method. > I also have a 'file' component that inherits the content > component. what is the best way of adding a file. > > Would I... > > 1. call the inherited addContent() method then the addFile() > method from a page that invokes the 'file' component. > 2. have the addFile() method of the 'file' component call the > addContent() method. this would mean that my addFile() method > would require the addContent arguments as well as it's own. > 3. or have a generic add() method in both components. would > the 'file' add() method overwrite the 'content' add() method? > > which way is best, or is there some other ways i'm not thinking of? > > thanks! > > phillip > > ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

