Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Verification for the creation of an object
Message
 
À
09/07/2001 01:19:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00528001
Message ID:
00528003
Vues:
19
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform