Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VARTYPE vs TYPE with Parent property
Message
 
To
27/07/2002 13:06:39
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00682266
Message ID:
00685211
Views:
31
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
Previous
Reply
Map
View

Click here to load this message in the networking platform