Module_PromptedFind
Type: |
Module |
Parent Module: |
N/A |
This module converts suppresses processing of certain events in the window $event method and field $event methods of window classes that contain a "Prompted find" command. For example an evOK will occur when the user terminates a "Prompted find" command by pressing the Enter key. This makes the behaviour of the application consistent with OMNIS 7v3 where such events were not generated.
Functionality
Only window classes are processed. Search all methods for "Prompted find" commands.
For each such command that is located:
- Create an instance variable in the class being processed called "iPromptedFind" of type boolean. This will be used as a flag to indicate when we are are currently executing a "Prompted find" command.
- Add code in the window "$event" method to bypass code within an "On evOk" if the flag is true. This prevents the code executing whilst we are executing a "Prompted find" command.
- Add code to all field "$event" methods on the window to bypass code within an "On evAfter" if the flag is true. This prevents validation code from being tiggered whilst we are processing a "Prompted find" command.
- Add code to "Calculate iPromptedFind" to kTrue immediately prior to the "Prompted find" command.
- Add code to "Calculate iPromptedFind" to kFalse immediately after the "Prompted find" command.
- "Prompted find" commands are only found within window classes.
- If events other than evOK and evAfter are to be suppressed, then code must be added to deal with those other events.