Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I get rid of all forms from memory
Message
From
21/11/2000 10:09:44
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00443633
Message ID:
00444089
Views:
17
>Trey,
>This raises the question Why. Forms and toolbars, for that matter, have a Parent property. All VFP baseclasses have it (even session). Vartype is not supposed to throw an error unless Forms[x] doesn't exist (in which case Parent could not be evaluated).
>
>Curiouser and curiouser!
>
>>>Thanks Larry
>>>

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.
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform