Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dummy question about inheritance
Message
De
20/06/2006 04:20:32
Goran Zidar
National Australia Bank
Melbourne, Australie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01125440
Message ID:
01130164
Vues:
22
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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform