Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing for presence of an object
Message
 
 
To
29/01/2002 18:37:06
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00612283
Message ID:
00612553
Views:
21
>Hi Sergey
>
>>
IF TYPE("Thisform.myobject.Name") = "C"
>
>At the risk of being pedantic, the above is true except in two cases:
>
>[1] The object was created using SCATTER NAME from a table which does not include a field called "Name". The EMPTY base class (used with SCATTER NAME) does not have any exposed properties at all - not even a name.
>
>[2] The name property has been flagged as 'Hidden' (and is called from anywhere but the root class) or 'Protected' (and is called from anywhere but root or sub class).
>
>In either case the above line of code will fail. The only really safe test is still:
>
>
IF TYPE( "Thisform.myobject" ) = "O" AND NOT ISNULL( Thisform.myobject )
Hi Andy,

You're right. I'm curious why would somebody make "Name" property Protected/Hidden?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform