Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dummy question about inheritance
Message
From
20/06/2006 04:20:32
Goran Zidar
National Australia Bank
Melbourne, Australia
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01125440
Message ID:
01130164
Views:
21
You have not actually overridden the value of mynumber in the class.

If I understand your question, you are unsure why the o2.mynumber value returns 1234 even though you have created the o1 object an set the o1.mynumber property to 5678? You need to understand that an object is an instance of a class. You cannot change the value of class properties at runtime you can only change the calue of object properties so the o1 object is quite independent from the o2 object and nothing that you do to o1 will have any influence over o2 in the example you have provided.

does that explanation make sense?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform