Unless an object is AddObject/NewObject to the parent, then the Parent property does not hold a reference to anything.
Bill,
Using the NewObject function creates a free standing object. The new object will not be associated with the parent object just because you assign a property value to it. If you use the NewObject method of the parent class:
THIS.NewObject("oChild","custom")
the oChild.Parent returns the correct object.
>Every object (I think) has a Parent object reference. Try Object.Parent.Name and see what you get.
>
>
>>I have a property on an object that is the refrence to another object (oParent.oChild). Is there a way of finding the "parent" object?
>>
>>More Details:
>>oParent = NEWOBJCT('parent')
>>
>>DEFINE CLASS parent AS custom
>>
>>oChild = .F.
>>
>>FUNCTION init
>>oChild = NEWOBJCET('custom')
>>ENDFUNC
>>
>>ENDDEF
>>
>>Who is oChild's parent?
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao