diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 4ce861683b..98e31cb51d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,15 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-06-17 23:00 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * tests/rto_get.prg + * source/rtl/tget.prg + ! Fixed TGet():assign() to pad character values + to the original length with the original content. + This also clears some existing differences in rto_get.prg. + + Added regression test specifically for this. + [TOMERGE RC1] + 2008-06-17 21:45 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * source/rtl/gtclip.c ! Added three LPWSTR casts to pacify warnings. diff --git a/harbour/source/rtl/tget.prg b/harbour/source/rtl/tget.prg index def4e0c5d1..dffe50fda4 100644 --- a/harbour/source/rtl/tget.prg +++ b/harbour/source/rtl/tget.prg @@ -226,9 +226,14 @@ CREATE CLASS Get ENDCLASS METHOD assign() CLASS Get + LOCAL xValue IF ::hasFocus - ::varPut( ::unTransform() ) + xValue := ::unTransform() + IF ::cType == "C" + xValue += SubStr( ::original, Len( xValue ) + 1 ) + ENDIF + ::varPut( xValue ) ENDIF RETURN Self diff --git a/harbour/tests/rto_get.prg b/harbour/tests/rto_get.prg index 9354d7aaa7..ce7e8980ea 100644 --- a/harbour/tests/rto_get.prg +++ b/harbour/tests/rto_get.prg @@ -352,6 +352,15 @@ FUNCTION Main( cArg01, cArg02, cArg03, cArg04 ) // ; + cStr07 := "12:34:56" + SetPos( 14, 16 ) ; o := _GET_( cStr07, "cStr07", "99:99",, ) + o:display() + o:setFocus() + TGetTOVS( o, { "78" } ) + TEST_LINE( o:Assign() ) + + // ; + nInt02 := 1234.56 SetPos( 14, 16 ) ; o := _GET_( nInt02, "nInt02", "@Z 9999999.9999",, ) o:display()