On 3/13/06, Phillip Senn <[EMAIL PROTECTED]> wrote:
> Q: But what about when I want a component to inherit the variables that are
> in a calling component?

This is a pretty common misconception about inheritance as people
first start getting into OO.  You don't inherit at the *object* level,
you inherit at the *class* level.  In other words, if you have a
Person object and set the first name to "Bob", inheritance isn't in
any way related to the situation wherein you want "child" objects to
also have the first name "Bob".  Inheritance is designed to give child
objects the *functionality* of the parent class.  It's behavior
related, not data related.

If you want a component to get data from another component ("inherit"
isn't the right term here at all), you would again pass the data in or
call getters on component A from inside component B.

Matt
--
Matt Woodward
[EMAIL PROTECTED]
http://www.mattwoodward.com


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