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:
01292185
Vues:
20
>>>
>>>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
>>
>>Thank you for your suggestion. I will try it. Although I am not clear to what would set the property .OkToInitialize to .F. or .T.?
>
>I guess you would set it to true in the parent class with the ability to set it to false in the child class if for some reason you don't want to fire the parent class code. Otherwise this property is not needed at all if you're sure you always need to fire parent's code.

Now I understand. Thank you very much.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform