Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I skip the parent method?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00068824
Message ID:
00068925
Vues:
37
>>I have a txtBase class.
>>I have sub-classed inGrid under it (to have some of my own PEM available).
>>I have sub-classed inGrid2 under that, in order to have an alternatate method of doing searches.
>>
>>My problem.
>>I have written code in inGrid2.GotFocus to replace inGrid.GotFocus.
>>Now how can I get txtBase.GotFocus to execute without inGrid.GotFocus executing?
>>
>>Maybe something like:
>>
>>inGrid2.GotFocus
>>nodefault && to prevent inGrid.GotFocus from executing
>>""
>>txtBase::GotFocus()
>>
>>Any reason why this won't work?
>>
>>I don't like hardcoding in a class name, but is there any other way?
>>
>>TIA
>>
>>Bill
>
>Bill, actually if you have any code in your inGrid2.GotFocus()
>it means that inGrid.GotFocus() code will not be executed unless you call it with DoDefault() or inGrid::GotFocus(). There is no need in NODEFAULT because NODEFAULT prevents executing of the default behaviour of this method, not the call to parentclass method. And then you need to call your txtBase::GotFocus() explicitly.

Your right. I realized that NODEFAULT was not necessary just as soon as I hit the send button.

Bill
Bill Morris
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform