2009-05-07 19:59 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* source/rtl/tget.prg
! Fixed to check for ::cType != NIL before
each SWITCH ::cType statments. Thanks to Przemek
for pointing it out.
* source/rtl/alert.prg
% Using hb_CStr() in extended mode. Also thanks to Przemek.
% Some minor opt.
This commit is contained in:
@@ -17,6 +17,16 @@
|
||||
past entries belonging to these authors: Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-05-07 19:59 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* source/rtl/tget.prg
|
||||
! Fixed to check for ::cType != NIL before
|
||||
each SWITCH ::cType statments. Thanks to Przemek
|
||||
for pointing it out.
|
||||
|
||||
* source/rtl/alert.prg
|
||||
% Using hb_CStr() in extended mode. Also thanks to Przemek.
|
||||
% Some minor opt.
|
||||
|
||||
2009-05-07 16:52 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbcompdf.h
|
||||
* harbour/source/compiler/harbour.y
|
||||
|
||||
@@ -71,10 +71,10 @@ FUNCTION Alert( xMessage, aOptions, cColorNorm, nDelay )
|
||||
RETURN NIL
|
||||
ENDIF
|
||||
|
||||
cMessage := ""
|
||||
|
||||
IF ISARRAY( xMessage )
|
||||
|
||||
cMessage := ""
|
||||
|
||||
lFirst := .T.
|
||||
FOR nEval := 1 TO Len( xMessage )
|
||||
IF ISCHARACTER( cLine := xMessage[ nEval ] )
|
||||
@@ -82,21 +82,10 @@ FUNCTION Alert( xMessage, aOptions, cColorNorm, nDelay )
|
||||
lFirst := .F.
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
ELSEIF ISCHARACTER( xMessage )
|
||||
cMessage := StrTran( xMessage, ";", Chr( 10 ) )
|
||||
ELSE
|
||||
|
||||
DO CASE
|
||||
CASE ValType( xMessage ) $ "CM" ; cMessage := StrTran( xMessage, ";", Chr( 10 ) )
|
||||
CASE hb_isNumeric( xMessage ) ; cMessage := hb_NToS( xMessage )
|
||||
CASE hb_isDate( xMessage ) ; cMessage := DToC( xMessage )
|
||||
CASE hb_isTimeStamp( xMessage ) ; cMessage := hb_TToC( xMessage )
|
||||
CASE hb_isLogical( xMessage ) ; cMessage := iif( xMessage, ".T.", ".F." )
|
||||
CASE hb_isObject( xMessage ) ; cMessage := xMessage:className + " Object"
|
||||
CASE hb_isSymbol( xMessage ) ; cMessage := "@" + xMessage:Name + "()"
|
||||
CASE hb_isBlock( xMessage ) ; cMessage := "{||...}"
|
||||
OTHERWISE ; cMessage := "NIL"
|
||||
ENDCASE
|
||||
|
||||
cMessage := hb_CStr( xMessage )
|
||||
ENDIF
|
||||
|
||||
#else
|
||||
|
||||
@@ -1120,7 +1120,7 @@ METHOD picture( cPicture ) CLASS GET
|
||||
|
||||
/* Generate default picture mask if not specified. */
|
||||
|
||||
IF Empty( ::cPicMask ) .OR. ::cPicture == NIL
|
||||
IF ( Empty( ::cPicMask ) .OR. ::cPicture == NIL ) .AND. ::cType != NIL
|
||||
|
||||
SWITCH ::cType
|
||||
CASE "D"
|
||||
@@ -1272,7 +1272,7 @@ METHOD unTransform() CLASS GET
|
||||
|
||||
cBuffer := ::cBuffer
|
||||
|
||||
IF ISCHARACTER( cBuffer )
|
||||
IF ISCHARACTER( cBuffer ) .AND. ::cType != NIL
|
||||
|
||||
SWITCH ::cType
|
||||
CASE "C"
|
||||
@@ -1721,13 +1721,15 @@ METHOD IsEditable( nPos ) CLASS GET
|
||||
|
||||
cChar := SubStr( ::cPicMask, nPos, 1 )
|
||||
|
||||
SWITCH ::cType
|
||||
CASE "C" ; RETURN cChar $ "!ANX9#LY"
|
||||
CASE "N" ; RETURN cChar $ "9#$*"
|
||||
CASE "D"
|
||||
CASE "T" ; RETURN cChar == "9"
|
||||
CASE "L" ; RETURN cChar $ "LY#" /* CA-Cl*pper 5.2 undocumented: # allow T,F,Y,N for Logical [ckedem] */
|
||||
ENDSWITCH
|
||||
IF ::cType != NIL
|
||||
SWITCH ::cType
|
||||
CASE "C" ; RETURN cChar $ "!ANX9#LY"
|
||||
CASE "N" ; RETURN cChar $ "9#$*"
|
||||
CASE "D"
|
||||
CASE "T" ; RETURN cChar == "9"
|
||||
CASE "L" ; RETURN cChar $ "LY#" /* CA-Cl*pper 5.2 undocumented: # allow T,F,Y,N for Logical [ckedem] */
|
||||
ENDSWITCH
|
||||
ENDIF
|
||||
|
||||
RETURN .F.
|
||||
|
||||
@@ -1735,45 +1737,48 @@ METHOD Input( cChar ) CLASS GET
|
||||
|
||||
LOCAL cPic
|
||||
|
||||
SWITCH ::cType
|
||||
CASE "N"
|
||||
IF ::cType != NIL
|
||||
|
||||
DO CASE
|
||||
CASE cChar == "-"
|
||||
::lMinus2 := .T. /* The minus symbol can be written in any place */
|
||||
::lMinus := .T.
|
||||
SWITCH ::cType
|
||||
CASE "N"
|
||||
|
||||
CASE cChar $ ".,"
|
||||
::toDecPos()
|
||||
RETURN ""
|
||||
DO CASE
|
||||
CASE cChar == "-"
|
||||
::lMinus2 := .T. /* The minus symbol can be written in any place */
|
||||
::lMinus := .T.
|
||||
|
||||
CASE ! ( cChar $ "0123456789+" )
|
||||
RETURN ""
|
||||
ENDCASE
|
||||
EXIT
|
||||
CASE cChar $ ".,"
|
||||
::toDecPos()
|
||||
RETURN ""
|
||||
|
||||
CASE "D"
|
||||
CASE ! ( cChar $ "0123456789+" )
|
||||
RETURN ""
|
||||
ENDCASE
|
||||
EXIT
|
||||
|
||||
IF !( cChar $ "0123456789" )
|
||||
RETURN ""
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE "D"
|
||||
|
||||
CASE "T"
|
||||
IF !( cChar $ "0123456789" )
|
||||
RETURN ""
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
IF !( cChar $ "0123456789" )
|
||||
RETURN ""
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE "T"
|
||||
|
||||
CASE "L"
|
||||
IF !( cChar $ "0123456789" )
|
||||
RETURN ""
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
IF !( Upper( cChar ) $ "YNTF" )
|
||||
RETURN ""
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE "L"
|
||||
|
||||
ENDSWITCH
|
||||
IF !( Upper( cChar ) $ "YNTF" )
|
||||
RETURN ""
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
ENDSWITCH
|
||||
ENDIF
|
||||
|
||||
IF ! Empty( ::cPicFunc )
|
||||
cChar := Left( Transform( cChar, ::cPicFunc ), 1 ) /* Left needed for @D */
|
||||
|
||||
Reference in New Issue
Block a user