Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a service pack in the pipe
Message
 
To
21/02/2004 17:05:58
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00879242
Message ID:
00879699
Views:
9
I don't know. I was using both. In a current project, because VARTYPE was obviously missing the mark, I changed all VARTYPE functions to TYPE.

About the test for a character value. I don't recall why, but I vette for OCX nodes by evaluating for a character key:
?TYPE('oform.ocxTreeView.Nodes(lcNodeKey).key')=="C"
* Rather than
?TYPE('oform.ocxTreeView.Nodes(lcNodeKey)')=="O"
VARTYPE does not always work as expected. In the case you present, it may. But I have to throw in the towel and trust in TYPE:).
>
>Are you saying that VARTYPE is okay when:
>VARTYPE(MyForm.Name)==[C]?
>

>
>I say this:
>if
>- VARTYPE(m.MyForm)=="O"
>and
>- m.MyForm is a reference to a VFP object
>and
>- the object m.MyForm have the property Name
>then
>- VARTYPE(m.MyForm.Name)==[C] is usable and return a okay value.
>
>Until now, I have not found a adverse proof.
>
>But:
>if
>- you use VARTYPE(MyForm.Name)
>and
>- exist ALIAS(nn)='MyForm'
>and
>- not exist a FIELD(mm,'MyForm')=='Name'
>then
>- VARTYPE not return "U", but fire a error ( it is a bug ).
>
>Fabio
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform