Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Verification for the creation of an object
Message
De
09/07/2001 07:49:09
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
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:
00528032
Vues:
21
>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
>
>
>if the same program who fires those lines contains the following:
>
>
>DEFINE CLASS UniversalThread AS wwProcess
>
>
>I am wondering in which situation it could failed.

Michel,
-You might edit wwProcess subclass to return .f. in init.
-w/o editing init at all default init code checks if it has Response object or can create it and if messaging type is 'file' a valid outputfile exists or not.
loServer in chain could also fail within edited SetServerEnvironment returning .f.
Those could return an .f. from init not instantiating the UT class at all.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform