Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hidden /Proctected properties
Message
 
To
04/12/1998 10:15:17
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00164076
Message ID:
00164210
Views:
21
Actually, Erik, I am not so sure that it is a bug. If it is I'd like to know.

From the documentation a hidden property is hidden from all objects but
the class itself. A protected property can be seen by subclasses but not
other classes. In all cases, however, in the case of an object based on your class (say through CREATEOBJECT(), or Form Designer), if you make the
property hidden or protected when you design your class, you will not be
able to do anything with it in the object based on your class.

It's in the doc. I personally cannot see the point of it since
you cannot "run a class", you always have to create an object based
on it ....

Michel.

================== Original message follows ====================

>Up until now I have not made it a practice to to make custom properties of my classes either hidden or protected. Never had a need to, and I don't really yet, but a couple of my classes are getting really heavy with properties and methods in the property sheet, and I am finding that most of these props and methods are only for internal use.
>
>So I went to the class definition and set a few of them to hidden. now when I run them, it crashes with "property 'myproperty' is not found.
>
>I meant hidden from subclasses and instances, not from itself! The code that crashes is in the same class definition that defines the hidden properties.
>
>Come to think of it, I think I tried this long ago with the same results and decided it wasn't worth the trouble. What am I missing here?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform