Unless I’m really misunderstanding your question, yes, you’re correct.

 

<cfcomponent name=”baseA”>

<cffunction name=”init” returnType=”baseA”>

            <cfset variables.baseVar1 = “123”>

            <cfset variables.baseVar2 = “foo”>

            <cfreturn this>

</cffunction>

</cfcomponent>

 

 

That’s your base class, right?.  Now if I have a class that extends it:

 

<cfcomponent name=”extendedClassB” extends=”baseA”>

<!--- some code - - >

            <cfset super.init()>

<!--- some code - - >

</cfcomponent>

 

….that doesn’t change the behavior of baseA.  And no matter where or when you call baseA’s init() method, baseA’s behavior won’t change until you chase the baseA.cfc class itself.  So you can call baseA.init() (or in your email/example, super.init() ) and it will always do the same thing.

 

 

 

Nolan Erck
Web Developer/Programmer
Schools Financial Credit Union
(916) 569-5409 Office
(916) 569-2024 Fax
www.schools.org

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Duba, Phillip
Sent: Tuesday, December 13, 2005 2:35 PM
To:
[email protected]
Subject: [CFCDev] Sanity check on super and its properties

 

If I have a base object with, say, 10 properties set (using its setters to put into variables. ) in the init function and in a component that extends the base object I make a call using super.init(), I can still have a return type for the base object’s init function be that base object (something like com.mysite.base), right? And that will set the 10 base properties for the extended component, right? Thanks,

 

Phil

 

Phillip Duba
Sr. Software Developer
VirtualEdge Corporation
1010 Stony Hill Road, Suite 150
Yardley, PA 19067
P: 215.504.7032
F: 215.504.8735
E: [EMAIL PROTECTED]
-------------------------------------------------------
www.VirtualEdge.com

Confidential Information

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. 

 

The information contained in this e-mail is confidential and may contain privileged information exempt from disclosure under applicable law. The information is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, employee, or agent responsible to deliver it to the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please delete the message from your computer and immediately notify the sender by telephone (you may call collect) at 916-569-5400 or by e-mail to [EMAIL PROTECTED] Thank you. ----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.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' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

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

Reply via email to