Really? Well lemme step back and rethink where i'm at then in this before i say anything more then. :)
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Barney Boisvert Sent: Wednesday, October 27, 2004 10:25 PM To: [EMAIL PROTECTED] Subject: Re: [CFCDev] calling a supertype from outside the subtype You should never want to do this. If you want the behaviour of the superclass, you should be using an instance of the superclass directly. Your workarounds would probably work, but the idea itself blatantly eliminates all the benefits of polymorphism. I'd be very careful about ever using that type of setup without careful consideration of the way the relevant components are related. cheers, barneyb On Wed, 27 Oct 2004 21:11:19 +0200, Nando <[EMAIL PROTECTED]> wrote: > > I don't expect there to be a way to do this, but i just thought i'd check. > > From within a subtype, you can of course use the super keyword to call a > method of the same name in the supertype. > > super.myMethod() > > Is there a way to do this from outside the subtype? For example > > <cfset mySubType = createObject('component','SubType').init() /> > <cfset mySubType.super.myMethod() /> > > This doesn't work, i'm just trying to express the idea clearly. > > My 2 workarounds if there is no direct way to do this would be either to > create a function in the subtype to return the value from the supertype, or > to add another getter of a different name in the supertype. > > ??? > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/blog/ I currently have 0 GMail invites for the taking ---------------------------------------------------------- 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] ---------------------------------------------------------- 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]
