Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Verification for the creation of an object
Message
 
To
09/07/2001 01:19:59
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00528001
Message ID:
00528003
Views:
18
>Assuming we create an object, such as:
>
>
>loProcess=CREATE("UniversalThread",loServer)
>
>
>Why would there be a need to verify this:
>
>
>IF VARTYPE(loProcess)#"O"
>   *** All we can do is return...
>   WAIT WINDOW NOWAIT "Unable to create Process object..."
>   RETURN .F.
>ENDIF
>
I've seen the VARTYPE test for GETOBJECT failure to enforce a CREATEOBJECT call.

>
>if the same program who fires those lines contains the following:
>
>
>DEFINE CLASS UniversalThread AS wwProcess
>
Would we need to assure instanciation with vartype providing the class definition was internal and that release does not occur until clear events? Is the prg with the definition being opened (set proc to, do myPRG, etc)? Is the class being released in code?

>I am wondering in which situation it could failed.
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform