Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Protected and Public
Message
From
31/05/1999 20:18:09
 
 
To
31/05/1999 09:01:23
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00224370
Message ID:
00224777
Views:
21
I understand you redefine the Display method in the form. In this case, protected properties are not visible.

Protected prop/methods are visible from the class where they are defined and from derived classes. When you redefine a method for an object in a form, the redefinition applies only to that instance of the class. This is not in the same class or in a derived class. IMO, this is the correct behavior (because this code is in fact in the Form).

Vlad

> I still abit confuse with it. Let's use an example:
>I have a timer class: mytimer
>method:
>Display
>?this.nhour
>?this.nmin
>?this.nses
>
>property:
>nhour (protected)
>nmin (protected)
>nsec (protected)
>
>I have added mytimer class into myform and inherint the display method with the following code.
>Inherintance method:
>Display
>?"Hour:" + str(this.nhour)
>?"minute:" + str(this.nmin)
>?"second:" + str(this.nsec)
>
>But i have an error message when run-time: Property nhour is not found
>
>Why?
>
>Thank you
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform