Variables in the “this” scope can be seen by _everything_, not just your inherited classes.  You should probably use the “Variables” scope if you just want them to be seen by inherited classes.

 

If you want to see everything that’s been inherited into your child CFC, you could write something like this:

 

<cffunction name=”showAllMyStuff” output=”true”>

            <cfdump var=”#Variables#” />

</cffunction>

 

…put that in your child CFC, and call it.  You should get an output of everything that’s visible inside that CFC, methods and variable names.

 

As another note, I would suggest renaming your “Request” CFC, as to not get confused between that and the “Request” scope, provided by ColdFusion.

 

Hth

 

 

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 Peter H
Sent: Thursday, May 12, 2005 3:18 PM
To: [email protected]
Subject: [CFCDev] Inheriting variables

 

Hi guys,

 

Its possible to inherit methods but is possible to inherit variables and do they have to be in the THIS scope to be accessible by the sub-class?

 

As an example I have a base class of type Request and two subclasses. One of type PingRequest and a second of type OptionRequest.

 

Each request consists of a series of case-sensitive name/value pairs and each has a validate method. I can add a validate method to my base Request class and override it in my subclasses but how would I add an array of name/value pairs to my base class and override them in my subclass?

 

Cheers, Pete (aka lad4bear) 

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).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

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).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

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

Reply via email to