From d42d38bafeb5b4c03bc192239638527893f450ac Mon Sep 17 00:00:00 2001 From: Paul Tucker Date: Sun, 22 Aug 1999 20:28:29 +0000 Subject: [PATCH] *** empty log message *** --- harbour/ChangeLog | 5 +++++ harbour/source/rtl/alert.prg | 23 +++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 98740d8c98..70ff9658d0 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +19990822-16:20 EDT Paul Tucker + * source/rtl/alert.prg + + PreExt() and PostExt() + These allow alert to display if dispbegin is in effect. + 19990822-20:02 GMT+1 Bruno Cantero * source/rdd/dbcmd.c source/rdd/dbf1.c diff --git a/harbour/source/rtl/alert.prg b/harbour/source/rtl/alert.prg index 2930fcffa3..0d8ca79fbb 100644 --- a/harbour/source/rtl/alert.prg +++ b/harbour/source/rtl/alert.prg @@ -13,8 +13,9 @@ #include "box.ch" #include "inkey.ch" -// ; TOFIX: Clipper can display an alert box even when DispBegin() is in effect. -// ; Clipper defines a clipped window for Alert() +Static snDcount + +// ; TOFIX: Clipper defines a clipped window for Alert() // ; Clipper will return NIL if the first parameter is not a string, but // this is not documented. This implementation converts the first parameter // to a string if another type was passed. You can switch back to @@ -147,6 +148,8 @@ FUNCTION Alert(xMessage, aOptions, cColorNorm, nDelay) nCurrent := nInitCol + Int((nWidth - nOpWidth) / 2) + 2 AEval(aOptionsOK, { |x| AAdd(aPos, nCurrent), AAdd(aHotKey, Upper(Left(x, 1))), nCurrent += Len(x) + 4 }) + PreExt() + IF lConsole FOR iEval := 1 TO Len(aSay) @@ -244,4 +247,20 @@ FUNCTION Alert(xMessage, aOptions, cColorNorm, nDelay) ENDIF + PostExt() + RETURN nChoice + +Proc PreExt + Local nCount := snDCount := DispCount() + + while ncount-- != 0 + DispEnd() + Enddo + +Proc PostExt + Local nCount + + While snDcount-- != 0 + DispBegin() + Enddo