Account for correct behaviour when //noalert is specified.

This commit is contained in:
Paul Tucker
1999-11-27 21:09:52 +00:00
parent 9caea442bd
commit 93dc486907
3 changed files with 23 additions and 11 deletions

View File

@@ -1,3 +1,12 @@
19991127-15:57 EST Paul Tucker <ptucker@sympatico.ca>
* Clipper does _not_ quit if //noalert is specified and alert() is called.
* source/rtl/alert.prg
* if s_lNoAlert
RETURN NIL // Don't quit!
* updated comment in __NoNoAlert()
* source/rtl/errorsys.prg
* check for empty( nChoice ) in case alert returns nil.
19991127-20:42 GMT+1 Victor Szel <info@szelvesz.hu>
* source/rtl/dummy.prg
+ source/rdd/dbeval.prg

View File

@@ -158,7 +158,8 @@ FUNCTION Alert( xMessage, aOptions, cColorNorm, nDelay )
DEFAULT s_lNoAlert TO __argCheck( "NOALERT" )
IF s_lNoAlert
QUIT
// QUIT
return nil
ENDIF
aSay := {}
@@ -410,8 +411,8 @@ FUNCTION Alert( xMessage, aOptions, cColorNorm, nDelay )
* $RETURNS$
* __NONOALERT() always return NIL.
* $DESCRIPTION$
* The //NOALERT command line switch cause the program to QUIT whenever
* it encounter ALERT() function, this function override this behavior
* The //NOALERT command line switch cause Clipper to ignore calls to
* the ALERT() function, this function override this behavior
* and always display ALERT() dialog box.
* $EXAMPLES$
* // make sure alert are been displayed

View File

@@ -87,14 +87,16 @@ STATIC FUNCTION DefError( oError )
ENDDO
DO CASE
CASE aOptions[ nChoice ] == "Break"
Break( oError )
CASE aOptions[ nChoice ] == "Retry"
RETURN .T.
CASE aOptions[ nChoice ] == "Default"
RETURN .F.
ENDCASE
IF !Empty( nChoice )
DO CASE
CASE aOptions[ nChoice ] == "Break"
Break( oError )
CASE aOptions[ nChoice ] == "Retry"
RETURN .T.
CASE aOptions[ nChoice ] == "Default"
RETURN .F.
ENDCASE
ENDIF
// "Quit" selected