Page 1 of 1

Error extraño con un Get

Posted: Wed Oct 18, 2006 12:46 pm
by riesrovi
En ocasiones cuando intento ingresar información me da este error javascript:emoticon(':(')
Sad
Application
===========
Path and name: C:\DATASOL\Datasol.Exe (32 bits)
Size: 2,958,848 bytes
Time from start: 0 hours 0 mins 47 secs
Error occurred at: 18/10/2006, 09:29:26
Error description: Error BASE/1068 Argument error: array access
Args:
[ 1] = U
[ 2] = U

Stack Calls
===========
Called from: tget.prg => TCLIPGET:DELETE(1535)
Called from: TGET.PRG => TBTNGET:KEYDOWN(724)
Called from: WINDOW.PRG => TWINDOW:HANDLEEVENT(0)
Called from: CONTROL.PRG => TBTNGET:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(3114)
Called from: => DIALOGBOX(0)
Called from: DIALOG.PRG => TDIALOG:ACTIVATE(254)
Called from: FACTURA.PRG => FACTURAR(534)
Called from: GEST.PRG => (b)EVAL(403)
Called from: GEST.PRG => EJECUTO(1144)
Called from: GEST.PRG => (b)MENUPRINCIPAL(403)
Called from: TSBUTTON.PRG => TSBUTTON:CLICK(804)
Called from: CONTROL.PRG => TCONTROL:HANDLEEVENT(0)
Called from: TSBUTTON.PRG => TSBUTTON:HANDLEEVENT(1308)
Called from: WINDOW.PRG => _FWH(3114)
Called from: => WINRUN(0)
Called from: WINDOW.PRG => TWINDOW:ACTIVATE(878)
Called from: GEST.PRG => MENUPRINCIPAL(452)
Called from: GEST.PRG => MAIN(232)

///Aquí está el código
REDEFINE BTNGET oGET[5] VAR oVAR[5] ID 106 of oDlgF PICTURE "999" ;
RESOURCE "LUPA" SPINNER ;
ON UP (++oVar[5],oGet[5]:Refresh(),FUNBUSCLI(oVar,oSayP,"VEN",3,5,@lOkVen,1)) ;
ON DOWN (--oVar[5],oGet[5]:Refresh(),FUNBUSCLI(oVar,oSayP,"VEN",3,5,@lOkVen,1)) ;
ACTION (oVar[5]:=0,FbProv(@oGet,@oVar,4,oSayP,5,lMod)) ;
Valid FUNBUSCLI(oVar,oSayP,"VEN",3,5,@lOkVen,1)
oGet[5]:bGotFocus:={ || oGet[5]:SelectAll() }

La variable es de Numérica
El problema es que no siempre da el error, y pueden pasar días sin problemas.

Un saludo cordial
Ricardo :(

Posted: Wed Oct 18, 2006 4:46 pm
by Antonio Linares
Ricardo,

Estás usando Harbour ó xHarbour ? Que build ?

Error extraño con un Get

Posted: Wed Oct 18, 2006 4:57 pm
by riesrovi
Uso xHarbour 0.99.60

Posted: Wed Oct 18, 2006 8:06 pm
by Antonio Linares
Ricardo,

Copia aqui el código fuente de Harbour\source\rtl\tget.prg lineas 1530-1540 aprox. gracias,

Error extraño con un Get

Posted: Thu Oct 19, 2006 12:05 pm
by riesrovi
METHOD _Delete( lDisplay ) CLASS Get

LOCAL nMaxLen := ::nMaxLen, n

DEFAULT lDisplay TO .t.

::Clear := .f.
::lEdit := .t.

if ::lPicComplex
// Calculating diferent nMaxLen for ::lPicComplex
for n := ::Pos to nMaxLen
if !::IsEditable( n )
exit
endif
next
nMaxLen := n - 1
endif

if ::type == "N" .and. SubStr( ::buffer, ::Pos, 1 ) IN "(-"
::minus := .f.
endif

::buffer := PadR( SubStr( ::buffer, 1, ::Pos - 1 ) + ;
SubStr( ::buffer, ::Pos + 1, nMaxLen - ::Pos ) + " " +;
SubStr( ::buffer, nMaxLen + 1 ), ::nMaxLen )

if ::type == "D"
::BadDate := IsBadDate( ::buffer, ::cPicFunc )
else
::BadDate := .f.
endif
::Changed := .T.

if lDisplay
::Display()
endif

return Self