Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I skip the parent method?
Message
 
To
01/01/1998 20:26:18
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00068824
Message ID:
00068832
Views:
39
>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.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform