The information in this article applies to:
SYMPTOMS
If a key that is assigned to an ON KEY LABEL procedure is pressed while
that same procedure is executing, an undesirable recursive condition will
be created. If this same key is accidentally held down, the typematic
function of MS-DOS (the rate at which MS-DOS repeats a character when you
hold down a key) may fill the keyboard buffer with as many as 31
keystrokes.
RESOLUTIONTo work around this problem, turn off the key trap at the beginning of the procedure, then set it back on again as the procedure is exited. The sample program below demonstrates this workaround. MORE INFORMATION
The simplest method of disabling an ON KEY LABEL trap is to assign the
asterisk (*) to the same key label that originally called the currently
executing procedure. This assignment should be the very first line of the
procedure, provided there are no parameters to be passed, in which case it
should immediately follow the PARAMETERS statement.
NOTE: While this method prevents recursive calls from within a procedure,
on some very fast machines this method will not prevent the procedure call
stack from overflowing. The "DO nesting too deep" error cannot be trapped
by an ON ERROR routine, as the ON ERROR routine must place its call on the
same stack.
Additional query words: VFoxWin FoxDos FoxWin OKL clear typeahead hotkey hot type ahead tshoot
Keywords : kbcode FxprgGeneral |
Last Reviewed: August 25, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |