ID: Q129844
2.60a MACINTOSH kbprg kbfixlist kbbuglist
The information in this article applies to:
INKEY() waits indefinitely for a keystroke with <expN> set to a value that is greater than zero (0). This occurs only if a User Defined Window and a Text Editing Window are active before the INKEY() command.
NOTE: This behavior does not occur in FoxPro for Windows or MS-DOS.
If you want INKEY() to wait for a keystroke for a specified period of time and you also want to activate a User Defined Window before the INKEY() command, then before doing so, make sure that you do not have an active Text Editing Window.
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Visual FoxPro 3.0b for Macintosh.
1. Create a Program called INKYTST.PRG that contains the following code:
DEFINE WINDOW tstwin from 2,2 to 10,40 float grow &&User Defined Window
ACTIVATE WINDOW tstwin
=INKEY(3) &&Wait 3 seconds for a keystroke
DEACTIVATE WINDOW tstwin
2. After entering the commands, leave the Text Editing Window for
INKYTST.PRG open, and run the program.
3. Notice that the program does not terminate after three seconds as
specified by the number assigned to the <expN> clause. It will wait
indefinitely for a keystroke.
Additional reference words: fixlist3.00b VFoxMac FoxMac 2.60a buglist2.60a
KBCategory: kbprg kbfixlist kbbuglist
KBSubcategory: FxprgGeneral
Keywords : FxprgGeneral kbbuglist kbfixlist
Version : 2.60a
Platform : MACINTOSH
Solution Type : kbfix
Last Reviewed: October 22, 1997