New Value Stored in _CUROBJ Doesn't Display in Debug

Last reviewed: June 27, 1995
Article ID: Q101286
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5 and 2.5a

When _CUROBJ is changed in the VALID clause of a GET command, the new value is not displayed in the Debug window until the procedure is exited. The display does not change since the value is not valid until after the procedure returns.

The following sample program demonstrates the values returned by _CUROBJ:

   CLEAR
   @ 3,5 GET one      DEFAULT " " VALID myvalid() WHEN mywhen()
   @ 5,5 GET two     DEFAULT " " VALID myvalid() WHEN mywhen()
   @ 7,5 GET three     DEFAULT " " VALID myvalid() WHEN mywhen()
   READ CYCLE

   FUNCTION myvalid

   IF     _CUROBJ = 1
       WAIT WINDOW "_CUROBJ = "+Alltrim(str(_CUROBJ))
   ENDIF
   IF     _CUROBJ = 2
       WAIT WINDOW "_CUROBJ = "+Alltrim(str(_CUROBJ))
   ENDIF
   IF     _CUROBJ = 3
       WAIT WINDOW "_CUROBJ = "+ALLTRIM(STR(_CUROBJ))+ "  Before setting";
         + " _curobj=2"
       _CUROBJ=2
       WAIT WINDOW "_CUROBJ = "+ALLTRIM(STR(_CUROBJ))+ "  After setting";
         + " _curobj=2"
   ENDIF

   FUNCTION mywhen
   IF     _CUROBJ = 1
       WAIT WINDOW "_CUROBJ = "+ALLTRIM(STR(_CUROBJ))
   ENDIF
   IF     _CUROBJ = 2
       WAIT WINDOW "_CUROBJ = "+ALLTRIM(STR(_CUROBJ))
   ENDIF
   IF     _CUROBJ = 3
       WAIT WINDOW "_CUROBJ = "+ALLTRIM(STR(_CUROBJ))
   ENDIF
   RETURN


Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a 2.x CUROBJ
KBCategory: kbprg
KBSubcategory: FxtoolDebug


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

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