Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TYPE() replace the MESSAGE() in a error?
Message
De
08/11/2001 22:00:53
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00577020
Message ID:
00579494
Vues:
37
Mario,

Have you tried using VarType() in place of Type()??

Try:
If VarType(oApp) == "O"
  If !ISNull(oApp)
    ** YOUR CODE
  EndIf
EndIf
or something to that effect. VarType() returns "U" instead of an error. I don't know if this solves your underlying problem but I think it should kill the error message.

Aloha,

James

>Hi,
>
>I have this code in several parts:
>
>IF TYPE('oApp')=='O' AND !ISNULL(oApp)
> *-- Code here
>ENDIF
>
>The oApp var is a reference to a obect with the config of my apps. Also, i use it to see if a form or procees run inside the real aplication or in the VFP main window (oApp is created when i start a application and destroy when return to VFP)
>
>The problem is that when a error occurs, i get the message "The var oApp is not found" or "oApp". If i put suspend and then resume, i get the real error message (for example: The file not exist)
>
>I see it for several months and i not can fix this...
>
>(Remenber: only occurs when i check if oApp is a object, and later -include several minutes- i get a normal VFP error)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform