This commit is contained in:
Andi Jahja
2002-09-29 05:18:29 +00:00
parent 536516a2af
commit 08b8e26b76
2 changed files with 21 additions and 8 deletions

View File

@@ -7,6 +7,10 @@
For example:
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2002-09-29 12:00 UTC+0700 Andi Jahja <andijahja@harbour-id.net>
* source/rtl/tget.prg
! fixed get (value and display) involving negative (with decimal)
number whose value is less than 1.
2002-09-28 21:50 UTC-0300 Horacio Roldan <harbour_ar@yahoo.com.ar>
* source/compiler/hbusage.c

View File

@@ -209,8 +209,6 @@ METHOD New( nRow, nCol, bVarBlock, cVarName, cPicture, cColorSpec ) CLASS Get
#ifdef HB_COMPAT_C53
::Caption := ""
#endif
return Self
//---------------------------------------------------------------------------//
@@ -353,9 +351,14 @@ return Self
METHOD Display( lForced ) CLASS Get
local nOldCursor := SetCursor( SC_NONE )
local xbuffer := ::buffer
DEFAULT lForced TO .t.
if !Empty(::DecPos ) .and. ::minus .and. !( "-" $ xbuffer )
xbuffer := space(::DecPos-2) + "-." + substr(::buffer,::Decpos+1)
endif
if ::HasScroll() .and. ::Pos != NIL
if ::nDispLen > 8
::nDispPos := Max( 1, Min( ::Pos - ::nDispLen + 4, ::nMaxLen - ::nDispLen + 1 ) )
@@ -364,9 +367,9 @@ METHOD Display( lForced ) CLASS Get
endif
endif
if ::buffer != NIL .and. ( lForced .or. ( ::nDispPos != ::nOldPos ) )
if xbuffer != NIL .and. ( lForced .or. ( ::nDispPos != ::nOldPos ) )
DispOutAt( ::Row, ::Col + if( ::cDelimit == NIL, 0, 1 ),;
Substr( ::buffer, ::nDispPos, ::nDispLen ), ;
Substr( xbuffer, ::nDispPos, ::nDispLen ), ;
hb_ColorIndex( ::ColorSpec, iif( ::HasFocus, GET_CLR_ENHANCED, GET_CLR_UNSELECTED ) ) )
if !(::cDelimit == NIL)
DispOutAt( ::Row, ::Col, Substr( ::cDelimit, 1, 1), hb_ColorIndex( ::ColorSpec, iif( ::HasFocus, GET_CLR_ENHANCED, GET_CLR_UNSELECTED ) ) )
@@ -407,6 +410,8 @@ METHOD End() CLASS Get
::Display( .f. )
endif
::minus := NIL
return Self
//---------------------------------------------------------------------------//
@@ -472,7 +477,9 @@ METHOD SetFocus() CLASS Get
if ::type == "N"
::decpos := At( iif( ::lDecRev .or. "E" $ ::cPicFunc, ",", "." ), ::buffer )
::minus := ( ::VarGet() < 0 )
if !::minus
::minus := ( ::VarGet() < 0 )
endif
else
::decpos := NIL
::minus := .f.
@@ -571,7 +578,9 @@ METHOD Untransform( cBuffer ) CLASS Get
case ::type == "N"
::minus := .f.
if !::minus
::minus := .f.
endif
if "X" $ ::cPicFunc
if Right( cBuffer, 2 ) == "DB"
::minus := .t.
@@ -1004,6 +1013,7 @@ METHOD Input( cChar ) CLASS Get
do case
case cChar == "-"
::minus := .t.
/* The minus symbol can be write in any place */
case cChar $ ".,"
@@ -1167,7 +1177,6 @@ METHOD PutMask( xValue, lEdit ) CLASS Get
endif
endif
If ::type == "D" .and. ::BadDate
cBuffer := ::Buffer
Endif
@@ -1274,7 +1283,7 @@ METHOD DeleteAll() CLASS Get
::minus := .f.
case ::type == "D"
xValue := CToD( "" )
::BadDate := .f.
::BadDate := .f.
case ::type == "L"
xValue := .f.
endcase