Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vartype() type works different for hyperlink?
Message
 
 
À
07/07/2003 15:53:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00807623
Message ID:
00807795
Vues:
16
clear all
? vartype( testmemvar ) && U
testmemvar = "hi"
? vartype( testmemvar ) && C
testmemvar = 0
? vartype( testmemvar ) && N
testmemvar = createobject( "form" )
? vartype( testmemvar ) && O
Bottom line vartype() is designed to work for memvars. It is not designed to work for object properties as you have seen from the errors thrown and the unpredictable results. Use type() or pemstatus() to test for object properties.

>I'm using VFP 7.0
>
>goHPL = CreateObject('HyperLink')
>? vartype( goHPL )           && returns 'O'
>? vartype( goHPL.test )      && returns 'U'
>? vartype( goHPL.Left )      && Error "Property Left is not Found"
>
>Is this the say it's supposed to work?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform