2002-02-21 06:00 UTC-0300 Walter Negro <anegro@overnet.com.ar>

METHOD ::ParsePict() - The change is because if ::Original it is not
          numeric, it would generate an error.

METHOD ::Undo() - Delete assignment to ::buffer because
          ::VarPut( ::Original, .t. ) makes this assignment.

METHOD ::VarPut() - Delete ::nDispLen := NIL line, because
          ::Picture() makes this assignment.
                      - Revert changes of Ignacio Ortiz because the
          problem was with ::nDispLen and not with empty cPicture.

METHOD ::Block() - Delete ::nDispLen := NIL line, because
          ::Picture() makes this assignment.

METHOD ::Picture() - Add ::nDispLen := NIL line, reset the variable.
          Only ::ParsePict() can load a value that can differ of
          nMaxLen.

METHOD ::KillFocus() - Change position of lines, hasfocus should be
          before the call to Putmask.
          This makes that in numeric fields, points or comas are not
          shown before the numbers.
This commit is contained in:
Walter Negro
2002-02-21 06:01:09 +00:00
parent 03b19caf23
commit 1c3e9b14ca

View File

@@ -268,7 +268,7 @@ METHOD ParsePict( cPicture ) CLASS Get
case ::type == "N"
cNum := Str( ::Original )
cNum := Str( ::VarGet() )
if ( nAt := At( iif( ::lDecRev, ",", "." ), cNum ) ) > 0
::cPicMask := Replicate( '9', nAt - 1 ) + iif( ::lDecRev, ",", "." )
::cPicMask += Replicate( '9', Len( cNum ) - Len( ::cPicMask ) )
@@ -384,9 +384,8 @@ return Self
METHOD Undo() CLASS Get
if ::hasfocus
::buffer := ::PutMask( ::original )
::VarPut( ::Original, .t. )
::pos := 1
::VarPut( ::Original, .f. )
endif
return Self
@@ -431,8 +430,8 @@ METHOD KillFocus() CLASS Get
::Assign()
::buffer := ::PutMask()
::hasfocus := .f.
::buffer := ::PutMask()
::pos := NIL
::Display()
@@ -452,10 +451,7 @@ METHOD VarPut( xValue, lReFormat ) CLASS Get
::Original := xValue
endif
::Type := ValType( xValue )
::nDispLen := NIL
if !Empty( ::cPicture )
::Picture( ::cPicture )
endif
::Picture( ::cPicture )
endif
endif
@@ -1192,6 +1188,8 @@ METHOD Picture( cPicture ) CLASS Get
if cPicture != NIL
::nDispLen := NIL
::cPicture := cPicture
::ParsePict( cPicture )
@@ -1225,9 +1223,9 @@ METHOD Block( bBlock ) CLASS Get
::Original := ::VarGet()
::Type := ValType( ::Original )
::nDispLen := NIL
::Picture( ::Picture )
endif
return ::bBlock