Then this is a bug (Garrett, Mike).
Check out the following:
otext = createobject("textbox")
? vartype(otext.DisneyWorld)
? vartype(otext.TheWorldIsComingtoanEnd)
These return U because they don't exist. If you add a property and assign a NULL value to it (as the Parent of a non-containered object should be IMO) then you get an X.
otext.AddProperty("oParent",.NULL.)
? vartype(otext.oParent)
Actually I don't care what value it returns as long as it's not an O. The point being it should not error out.
>Any object not inside a container will error out on
Vartype(object.Parent)
.
>Try this:
>
ox = CreateObject("textbox")
>? Vartype(ox.Parent)
>
>If the form is not part of a formset (e.g., not in the designer) it will fail.
>
>Parent seems to be removed or deallocated if the object is not inside a container. It still shows up in an AMembers() array or the object tree in the Watch window - but in the Watch window it cannot be evaluated.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao