una corrección

una corrección

Postby fleal » Tue Dec 04, 2007 4:49 am

Antonio,

Con el último build obtengo este error.
El bkeydown se evalua dos veces, en mi caso he optado por tomar el tget.prg de la FW712 y he comentado las lineas para evitar que truene.
con ésta modificación hecha funciona bien.

METHOD KeyDown( nKey, nFlags ) CLASS TGet

local nHi, nLo, nPos, nLastHi := -1


::nLastKey = nKey

// if ::bKeyDown != nil

// if Eval( ::bKeyDown, nKey, nFlags, Self ) == 0
// return 0
// endif
//
// endif

do case
case nKey == VK_UP



Este es el error

Application
===========
Path and name: E:\ap\Captura\Digital.exe (32 bits)
Size: 2,400,768 bytes
Time from start: 0 hours 0 mins 23 secs
Error occurred at: 03/12/2007, 18:45:17
Error description: Error BASE/1070 Argument error: ==
Args:
[ 1] = L .T.
[ 2] = N 0

Stack Calls
===========
Called from: Digital.prg => TGET:KEYDOWN(677)
Called from: Digital.prg => TGETFER:KEYDOWN(159)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: CONTROL.PRG => TCONTROL:HANDLEEVENT(0)
Called from: Digital.prg => TGET:HANDLEEVENT(486)
Called from: Digital.prg => TGETFER:HANDLEEVENT(82)
Called from: WINDOW.PRG => _FWH(0)
Called from: => DIALOGBOX(0)
Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0)
Called from: DSuper.prg => DOBLECAPTURA(2388)
Called from: DSuper.prg => (b)DSUPER(189)
Called from: Digital.prg => TGETFER:LVALID(1002)
Called from: CONTROL.PRG => TGETFER:FWLOSTFOCUS(0)
Called from: CONTROL.PRG => TCONTROL:HANDLEEVENT(0)
Called from: Digital.prg => TGET:HANDLEEVENT(486)
Called from: Digital.prg => TGETFER:HANDLEEVENT(82)
Called from: WINDOW.PRG => _FWH(0)
Called from: => SYSREFRESH(0)



Fernando Leal
México, DF
fleal
 
Posts: 234
Joined: Tue Oct 25, 2005 12:39 am
Location: México, DF

Postby Antonio Linares » Tue Dec 04, 2007 8:00 am

Fernando,

Es que hay que modificar ::bKeyDown para que devuelva cero ó nil

pero vamos a modificar la clase para mantener compatibilidad con el código anterior :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42159
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Tue Dec 04, 2007 8:04 am

Fernando,
Code: Select all  Expand view  RUN
   if ::bKeyDown != nil
      if ValType( uVal := Eval( ::bKeyDown, nKey, nFlags, Self ) ) == "N" .and. ;
         uVal == 0
         return 0
      endif   
   endif   

Como al final se llama a Super:KeyDown() se debe estar llamando dos veces a bKeyDown. A ver como lo solucionamos. Gracias!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42159
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Tue Dec 04, 2007 8:07 am

Fernando,

En window.prg hay que modificar esto en el método KeyDown:
Code: Select all  Expand view  RUN
   if Upper( ::ClassName() ) != "TGET" .and. ::bKeyDown != nil
      return Eval( ::bKeyDown, nKey, nFlags )
   endif
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42159
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Gracias

Postby fleal » Wed Dec 05, 2007 2:06 am

Antonio,

Mil Gracias!!!

Fernando
fleal
 
Posts: 234
Joined: Tue Oct 25, 2005 12:39 am
Location: México, DF


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 34 guests