Microsoft KB Archive/101286

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

New Value Stored in _CUROBJ Doesn't Display in Debug

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


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