Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Order of instantiation
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01292155
Message ID:
01292167
Vues:
25
>I know. But I would like to know if I should call DODEFAULT() in INIT method of the Class B before calling method MYMETHOD1() of Class A. Ideally I would like to call MYMETHOD1() in the INIT method of the Class A so that any class that inherits from class A automatically calls this method.

Yes, just add this.MyMethod1() in the parent class Init method and class B will inherit it.

Just in case you may add a property to your parent class to be able to prevent this method call in ClassB, so in classA you would have in Init
if thisform.lOkToInitialize
   thisform.MyMethod1()
endif
and in classB Init you would have in Init
if Dodefault()
  more code
else
  return f.
endif
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform