> I have component base class, I'll call Obj1
This is where you perhaps start confusing yourself. Class !=
object. A
class defines what it is to be an object; an object is a
"realisation" of
that class.
In CF there are no classes, but the closest parallel is a CFC
file. Not a
CFC *instance*, but the file itself, in the file system.
Similarly in CF there aren't "objects", really, but the
closest parallel is
a CFC instance (as created by createObject(),
<cfobject> or <cfinvoke>).
Objects reside in memory, not in the file system.
> From there Obj1->A should call Obj1->B, but it
isn't. It's calling Obj2->B,
No, because if you have this:
o = create("component", "Obj2");
then o is an Obj2. It's not "part Obj2 and part Obj1,
depending on which
line of code is being executed". It doesn't matter whether
the methods are
defined in Obj2 or Obj1; the object itself is an Obj2.
When you call a method, CF doesn't look for a method of that
name *in the
current CFC file*, it looks for a method of that name *in the
object*. And
because it's an Obj2, it will "see" the b() method of Obj2,
even if the
code being executed is in Obj1.cfc.
Make sense?
--
Adam