Not neccesarily. For example objects created with SCATTER NAME do not have a .Parent property (they don't have a .Name property either)
The more reliable way is to check
IF TYPE("myObject.Parent")= "O"
...
ENDIF
>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?
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison