Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vartype() bug in VFP 7.0?
Message
De
03/09/2003 04:57:54
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00825419
Message ID:
00825581
Vues:
21
Hi Rich,

this is because on VFP if a object don't have a parent,
parent isn't NULL, it isn't undefined, it is a ZOMBI property with a error trapping attacked to it.
Identical behaviour you have for _SCREEN.ActiveForm or _SCREEN.ActiveControl.

For me VFPT must change this behaviour, and set it to an object vartype
with value set to NULL.

Also VARTYPE() it needs of some improvement.

Example ( on command window ):
? VARTYPE(_screen)
? VARTYPE(_screen.Top)
? VARTYPE(_screen.xc)
? VARTYPE(_screen.parent)        && <---
? VARTYPE(_screen.ActiveForm)    && <---
? VARTYPE(_screen.ActiveControl) && <---
? VARTYPE(z)
? VARTYPE(z+1)                   && <--- VARTYPE()need improvement
z=4
? VARTYPE(z+1)
? VARTYPE(NULL+1)          
y=null
? VARTYPE(y+1)                   && <-- VARTYPE() need improvement
? VARTYPE(_screen.w[1])          && 
? VARTYPE(w[1])                  && <-- VARTYPE() need improvement
You have to use the slow function TYPE(),
this eval the expression, and for any error return "U".

Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform