Microsoft KB Archive/105146: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - "<" to "<")
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{|
{|
|width="100%"|
|width="100%"|
= PRB: &quot;DO Nesting Too Deep&quot; with ON KEY LABEL Command from 2.0 =
= PRB: "DO Nesting Too Deep" with ON KEY LABEL Command from 2.0 =


'''ID: Q105146'''
'''ID: Q105146'''
Line 12: Line 12:
== SYMPTOMS ==
== SYMPTOMS ==


An ON KEY LABEL command that works in FoxPro 2.0 generates a &quot;DO nesting too deep&quot; error message in FoxPro 2.5 for MS-DOS and Windows.
An ON KEY LABEL command that works in FoxPro 2.0 generates a "DO nesting too deep" error message in FoxPro 2.5 for MS-DOS and Windows.


== CAUSE ==
== CAUSE ==
Line 20: Line 20:
== RESOLUTION ==
== RESOLUTION ==


To correct this problem, append the PLAIN clause to the end of the ON KEY LABEL command, as shown at the end of the &quot;More Information&quot; section below.
To correct this problem, append the PLAIN clause to the end of the ON KEY LABEL command, as shown at the end of the "More Information" section below.


== MORE INFORMATION ==
== MORE INFORMATION ==
Line 31: Line 31:
   CLEAR
   CLEAR
   DEFINE POPUP fruits FROM 5,5 MULTISELECT MARGIN
   DEFINE POPUP fruits FROM 5,5 MULTISELECT MARGIN
   DEFINE BAR 1 OF fruits PROMPT '\&lt;Apples' MARK CHR(3)
   DEFINE BAR 1 OF fruits PROMPT '\<Apples' MARK CHR(3)
   DEFINE BAR 2 OF fruits PROMPT '\&lt;Bananas' MARK CHR(4)
   DEFINE BAR 2 OF fruits PROMPT '\<Bananas' MARK CHR(4)
   DEFINE BAR 3 OF fruits PROMPT '\&lt;Grapes' MARK CHR(5)
   DEFINE BAR 3 OF fruits PROMPT '\<Grapes' MARK CHR(5)
   DEFINE BAR 4 OF fruits PROMPT '\&lt;Lemons' MARK CHR(6)
   DEFINE BAR 4 OF fruits PROMPT '\<Lemons' MARK CHR(6)


   ACTIVATE POPUP fruits
   ACTIVATE POPUP fruits

Latest revision as of 15:03, 20 July 2020

PRB: "DO Nesting Too Deep" with ON KEY LABEL Command from 2.0

ID: Q105146

The information in this article applies to:

  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, and 2.5a
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a

SYMPTOMS

An ON KEY LABEL command that works in FoxPro 2.0 generates a "DO nesting too deep" error message in FoxPro 2.5 for MS-DOS and Windows.

CAUSE

In FoxPro 2.0, you can use a recursive ON KEY LABEL command such as ON KEY LABEL SPACEBAR KEYBOARD '{SHIFT+SPACEBAR}.' However, if you use a recursive ON KEY LABEL command in FoxPro 2.5 for MS-DOS and Windows, you will receive the above-mentioned error. This is correct behavior because you are using a key that is used to call the ON KEY LABEL command.

RESOLUTION

To correct this problem, append the PLAIN clause to the end of the ON KEY LABEL command, as shown at the end of the "More Information" section below.

MORE INFORMATION

The following code illustrates the problem. This code can be run from a .PRG file.

   * Beginning of code

   ON KEY LABEL SPACEBAR KEYBOARD '{SHIFT+SPACEBAR}'
   CLEAR
   DEFINE POPUP fruits FROM 5,5 MULTISELECT MARGIN
   DEFINE BAR 1 OF fruits PROMPT '\<Apples' MARK CHR(3)
   DEFINE BAR 2 OF fruits PROMPT '\<Bananas' MARK CHR(4)
   DEFINE BAR 3 OF fruits PROMPT '\<Grapes' MARK CHR(5)
   DEFINE BAR 4 OF fruits PROMPT '\<Lemons' MARK CHR(6)

   ACTIVATE POPUP fruits

   * End of code

When the SPACEBAR is pressed in FoxPro 2.0, FoxPro will mark the bar as selected. In FoxPro 2.5 for MS-DOS and Windows, FoxPro will give you the above-mentioned error message. To correct this situation in FoxPro 2.5, issue the following ON KEY LABEL command instead:

   ON KEY LABEL SPACEBAR KEYBOARD '{SHIFT+SPACEBAR}' PLAIN

Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a errmsg err msg KBCategory: kbprg kberrmsg kbprb KBSubcategory: FxprgGeneral


Last Reviewed: June 27, 1995
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.