Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
KeyPress method - skip the class code
Message
From
02/05/2019 01:05:56
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01668315
Message ID:
01668351
Views:
92
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>I have a form's class with KeyPress method code. I have a form based on that form's class where I don't want to execute parent's class method. I added NODEFAULT in the KeyPress event and found that pressing keys in that form didn't do anything (e.g. input controls stopped operations).
>
>So, how can I have normal operation of KeyPress but prevent class method's to execute?
>
>Thanks in advance.

If you can modify the parent class, add a property like "skipkeypress" and in Keypress check this property to return without handling the code.

In Subclasses where you need to skip the Default Code, set this property to .T.
This adds complexity but seems to deal with your situation better than to overwrite completely.
Christian Isberner
Software Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform