Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VARTYPE vs TYPE with Parent property
Message
De
25/07/2002 15:56:51
 
 
À
24/07/2002 15:52:33
Beth Wetherbee
Virginia Beach Public Schools
Virginia Beach, Virginie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00682266
Message ID:
00682737
Vues:
24
Let's try this instead:


Original code---

IF VARTYPE(This.Parent) = 'O'
This.Parent.Error(nError, cMethod, nLine)
ELSE
DODEFAULT(nError, cMethod, nLine)
ENDIF


New code---

IF VARTYPE(This.Parent) <> 'O'
DODEFAULT(nError, cMethod, nLine)
ELSE
This.Parent.Error(nError, cMethod, nLine)
ENDIF


This.parent results in nothing, not even undefined; therefore, it is safe to say it will not result in an "O" as well. Hence, if VARTYPE(This.Parent) is not equal to "O" then perform the default error routine; otherwise perform the one from the Parent.

After all, THIS.Parent will NOT result in "C", "N", "D"... or any other data type other than "O".


P.S. Beth, I think you probably understood my prior post anyway, but required some further clarification.
Gordon de Rouyan
DC&G Consulting
Edmonton, Alberta
Email: derouyag@shaw.ca
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform