Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DO FORM NAME question
Message
De
02/02/1997 19:32:18
 
 
À
02/02/1997 17:38:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00019076
Message ID:
00019082
Vues:
34
>In some place in my framework, I do DO FORM myform NAME myvariable resulting in a myvariable becoming a type Object.
>
>When the form is close, myvariable is still an Object. Should I modify my baseform to release the object or there is an automatic way of having this behavior when a form is close?

This is happening because a variable of type object is in fact a pointer to the object (e.g. a memory address). When the variable is created, it has the type "O". (My explanation: FoxPro keeps a list of variables with type for each of them. I don't know if this is the truth.). When the object is released, the variable has the value .NULL., but the type is still "O". Looks like a bug, but is not. Because the value was a memory address of an object, the type was "O". When the object is released, the value of the variable is changed, but the type is the same. I find normal this behavior.

The solution: test your variable with ISNULL() function. If it returns .t., your object doesn't exist anymore.

Vlad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform