main logo
Subject: Error in utility.prg
Author: Virgil Bevans
Posted: 2002/11/16 10:36:59
 
View Entire Thread
New Search


Have located an error in ErrorMsg() located in utility.prg. May be corrected as follows:

FUNCTION ErrorMsg(tcMessage, tnOptions, tcTitle)
LOCAL lnOptions, lcTitle

* Change 11/16/02 - vbb If you actually call this routine with parameters
* the local variables remain logical .F. causing an error in the MESSAGEBOX()
* call. Replace 'IF' statements with 'CASE' statement.
* IF PCOUNT() < 3
* lcTitle = APPNAME_LOC
* ENDIF

* IF PCOUNT() < 2
* lnOptions = MB_ICONEXCLAMATION
* ENDIF
DO CASE
CASE PCOUNT() = 3
lnOptions = tnOptions
lcTitle = tcTitle

CASE PCOUNT() = 2
lnOptions = tnOptions
lcTitle = APPNAME_LOC

OTHERWISE
lnOptions = MB_ICONEXCLAMATION
lcTitle = APPNAME_LOC
ENDCASE

?? CHR(7)
MESSAGEBOX(tcMessage, lnOptions, lcTitle)
RETURN
ENDFUNC

 
©2002 Virgil Bevans
<-- Prior Message New Search Next Message -->