Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VARTYPE vs TYPE with Parent property
Message
 
À
27/07/2002 13:06:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00682266
Message ID:
00685211
Vues:
33
Have you noticed that vartype and type have different behaviors:
With ActiveX, when checking for the existance of a 'node', VARTYPE will error out:
?VARTYPE(foo.nodes(somekey).key)="C", will push an object refence error, while:
?TYPE('foo.nodes(somekey).key')="C", will return a true or false depending on the existance of the key!

Don't know if this has an revelance to your thread, but it is an interesting comparison.




>>Hi Bill,
>>
>>Foxpro keeps the variable type when you assign Null value to it.
myvar = Createobject("Line")
>>? Type("myvar"), VarType(myvar)
>>myvar = Null
>>? Type("myvar"), VarType(myvar)
>>
>
>Hi Sergey,
>Is there any reason I cannot assume that an object's Parent is an Object?
>
>** Type('loObject.Name') = 'C'
>DO WHILE TYPE('loObject.Parent')='O'
>  loObject = loObject.PARENT
>ENDDO
>
>Should I change that to this?
>
>DO WHILE TYPE('loObject.Parent.Name')='C'
>  loObject = loObject.PARENT
>ENDDO
>
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform