Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining existence of an object
Message
From
10/08/1999 10:33:40
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00251780
Message ID:
00251970
Views:
13
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
Previous
Reply
Map
View

Click here to load this message in the networking platform