Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vartype() type works different for hyperlink?
Message
 
 
To
07/07/2003 15:53:47
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00807623
Message ID:
00807795
Views:
15
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform