Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Toolbox bug
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Toolbox bug
Miscellaneous
Thread ID:
00723460
Message ID:
00723460
Views:
41
In the ToolBoxCtrls::cFoxForm class, the Deactivate() method, I was occasionally getting "Syntax Errors". I'm not entirely sure why, but the .cUDFParms, .cTalk, .cEscape properties weren't always filled in (so this is possibly just a symptom of something else). So, as soon as it attempts to SET UDFPARMS TO &cUDFParms, it would fail with a syntax error. Here is the modified code:
** We reset the TALK setting
LOCAL cTalk, cEscape, cUDFParms

m.cUDFParms = THIS.cUDFParms

IF !EMPTY(m.cUDFParms)
   SET UDFPARMS TO &cUDFParms
ENDIF   

m.cTalk = THIS.cTalk 

IF !EMPTY(m.cTalk)
   SET TALK &cTalk
ENDIF   

m.cEscape = THIS.cEscape

IF !EMPTY(m.cEscape)
   SET ESCAPE &cEscape
ENDIF
   
SYS(3054,THIS.nSys3054)


** We make sure the screen is activated
ACTIVATE SCREEN

** We reset the old status
SET MESSAGE TO THIS.cOldStatus 

DODEFAULT()
-Paul

RCS Solutions, Inc.
Blog
Twitter
Reply
Map
View

Click here to load this message in the networking platform