Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining existence of an object
Message
De
10/08/1999 10:33:40
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00251780
Message ID:
00251970
Vues:
14
Hi Jim ---

Yes, TYPE can get screwy but I don't think VARTYPE does. Again, if VARTYPE returns an "O", the object lives. If it returns anything else, like a "U" or "X" the object either hasn't been instanced or it's been released. The original question was how to determine if an object has been instanced yet.

Of course, if we manage our apps the right way we don't need no steenkin VARTYPE to determine which objects are open or not :-D


>>IF VARTYPE(oMyObject) = "O" && It's an object
>
>John,
>
>This will fail on certain circumstances, for example;
>
>
>oObj = CReateObject("Form")
>? TYPE("oObj") && O
>?TYPE("oObj.Name") && C
>oObj = NULL
>?TYPE("oObj") && O
>?TYPE("oObj.Name") && U
>
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform