Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine if an object exists
Message
 
 
To
10/05/1998 06:21:24
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00098172
Message ID:
00098384
Views:
36
Dragan,

Protected can be useful, but it's a real PITA for a lot of reasons. Sure it hides details which is good OO, but the cost seems too high. They even greatly hinder class development because you can't watch/change the properties in the debug window. So you can't even mark them as such until the class is ready for release and then what happens if another person finds a bug

One thing I've started doing for publicly released classes is to start internally used names with _ to kind of stand for protected. ie don't alter this property, or this method is internal and you should use one of the other methods.

>>Hidden and Protected cause .Name to return U in TYPE(). Admittedly this is a rather special case, but if it weren't for special cases us programmers would be out of jobs. *g*
>
>David, you have just made me set an inhouse rule: never set the name protected or hidden. Amen.
>
>[after having read couple of messages downstream]
>Of course, if ever I get to make something that needs a .tlb, I'll think twice :)
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform