Al equipo de FiveWin:
Al copiar celdas en xBrowse todo Ok, salvo cuando son DATE.
Ejemplo:
si copio '31/01/2013'
al pegar este dato a otra celda tipo DATE aparentemente no copia nada.
El problema esta en el siguiente codigo:
ejemplo:
'31/01/2013' lo convierte a: '2013-01-31'
y al hacer el pegado (PASTE), uCharToVal( '2013-01-31', @cType ) devuelve vacio (" / / ").
Esto se debe a que uCharToVal( ) hace la conversion por medio de dCharToDate( cDate ) y dCharToDate( )
tiene este codigo:
"YYYY-MM-DD" y If( cc == 'dd', 'mm/dd/yy', 'dd/mm/yy' ) son formatos de fechas incompatibles.
es decir CToD( "2013-01-31" ) -> ' / / '
Para corregir el problema, se podria cambiar el metodo PASTE
Espero su opinion.
Atentamente,
Rolando
Cochabamba - Bolivia
FWH 1109 - xHarbour 1.1.0 (SimpLex) - BCC58
Al copiar celdas en xBrowse todo Ok, salvo cuando son DATE.
Ejemplo:
si copio '31/01/2013'
al pegar este dato a otra celda tipo DATE aparentemente no copia nada.
El problema esta en el siguiente codigo:
METHOD ClpText() CLASS TXBrwColumn
:
:
elseif ::cDataType == 'D'
cDtFmt := Set( _SET_DATEFORMAT )
Set( _SET_DATEFORMAT, "YYYY-MM-DD" )
RetVal := DTOC( RetVal )
Set(_SET_DATEFORMAT, cDtFmt )
:
:
return RetValejemplo:
'31/01/2013' lo convierte a: '2013-01-31'
y al hacer el pegado (PASTE), uCharToVal( '2013-01-31', @cType ) devuelve vacio (" / / ").
METHOD Paste( cText ) CLASS TXBrwColumn
if ::cDataType $ 'CM'
:
else
uNew := uCharToVal( cText, @cType )
endif
endif
return nilEsto se debe a que uCharToVal( ) hace la conversion por medio de dCharToDate( cDate ) y dCharToDate( )
tiene este codigo:
static function dCharToDate( cDate )
:
:
Set( _SET_DATEFORMAT, If( cc == 'dd', 'mm/dd/yy', 'dd/mm/yy' ) )
dDate := CToD( cDate )
:
:
return dDate"YYYY-MM-DD" y If( cc == 'dd', 'mm/dd/yy', 'dd/mm/yy' ) son formatos de fechas incompatibles.
es decir CToD( "2013-01-31" ) -> ' / / '
Para corregir el problema, se podria cambiar el metodo PASTE
METHOD Paste( cText ) CLASS TXBrwColumn
local uNew, cType
if ::cDataType $ 'CM'
if Eval( ::oBrw:bLock )
::Value := Trim( cText )
Eval( ::oBrw:bUnLock )
endif
elseif ::cDataType $ 'D' //<--- aca el cambio ....
uNew := STOD(strtran( cText, "-" ))
if EVal( ::oBrw:bLock )
::Value := uNew
Eval( ::oBrw:bUnlock )
endif //....hasta aca.
else
uNew := uCharToVal( cText, @cType )
if uNew != nil
if ::cDataType == nil .or. ::cDataType == cType
if EVal( ::oBrw:bLock )
::Value := uNew
Eval( ::oBrw:bUnlock )
endif
endif
endif
endif
return nilEspero su opinion.
Atentamente,
Rolando
Cochabamba - Bolivia
FWH 1109 - xHarbour 1.1.0 (SimpLex) - BCC58