Nevermind. It makes sense to me now. It is a parent-child relationship, of course. I agree with you, it wouldn't be good to access the parent's variables directly. I'm surprised you're able to at all.
I'm new to objects- I was getting parent-child relationships confused with inheritance. >But this is not a parent-child relationship; it's composition! > >>It is true. If in parent.cfc, outside the methods or in a method but not >>var scoped or attribute scoped, if you do x=1, then child.cfc can access >>it as well. Does it make sense to use that feature? My gut instincts say >>no - even if I could access parent.cfc's private variables, I wouldn't >>count on it. >> >>======================================================================= >>Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc >>Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) >> >>Email : [EMAIL PROTECTED] >>Blog : www.camdenfamily.com/morpheus/blog >>Yahoo IM : morpheus >> >>"My ally is the Force, and a powerful ally it is." - Yoda >> >>> -----Original Message----- >>> From: Brad Howerter [mailto:[EMAIL PROTECTED] >>> Sent: Saturday, March 29, 2003 8:38 AM >>> To: CF-Talk >>> Subject: accessing parent cfc's variables >>> >>> >>> Oh, yeah, I'd forgotten the original question. Raymond, you >>> said the 'lower' class has access to the unnamed scope of the >>> parent? I guess that's where I started thinking this was an >>> inherited object and not just one of composition. It's not >>> true, is it, that the unnamed scope would be available? If >>> the object is not inheriting its parent, why would have >>> access to the unnamed scope? >>> >>> >On Friday, Mar 28, 2003, at 08:02 US/Pacific, Brad Howerter wrote: >>> >> The child CFC automatically inherits all of its parents >>> values, so to >>> >> me it seems redundant to call a method to get them. >>> > >>> >That's true of inheritance not of composition. The question was about >>> >the latter. >>> > >>> >Sean A Corfield -- http://www.corfield.org/blog/ >>> > >>> >"If you're not annoying somebody, you're not really alive." >>> >-- Margaret Atwood >>> > >>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

