FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour xbrowse arreglos de bugs!
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
xbrowse arreglos de bugs!
Posted: Sun Jun 21, 2009 08:27 AM
Despues de probar el c贸digo que hemos publicado aqui:
viewtopic.php?f=6&t=15936

hemos detectado unos errores en la Clase TXBrowse que hay que arreglar asi:

1) Method End() tiene que ser renombrado como Destroy(). Estaba mal. Y finalmente llamar a return Super:Destroy()

2) Este c贸digo es necesario en Method CreateButtons() antes de @ ..., ... :
Code (fw): Select all Collapse
 
聽 聽 聽 if ::oBtnList != nil
聽 聽 聽 聽 聽::oBtnList:End()
聽 聽 聽 endif 聽 
聽 聽 聽 if ::oBtnElip != nil
聽 聽 聽 聽 聽::oBtnElip:End()
聽 聽 聽 endif

3) En la funci贸n TXBrows() el browse no se destru铆a:
Code (fw): Select all Collapse
聽 聽if ValType( bChild ) == 'B'
聽 聽 聽 bXBr:End()
聽 聽 聽 bXBr := bChild
聽 聽endif

4) PalBmpFree() no est谩 funcionando bien. Hay que a帽adir esta funci贸n:
Code (fw): Select all Collapse
 
function PalBmpFree( hBmp, hPal )

   DeleteObject( hBmp )
   DeleteObject( hPal )

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: xbrowse arreglos de bugs!
Posted: Sun Jun 21, 2009 01:59 PM
Otro bug arreglado:
Code (fw): Select all Collapse
METHOD End() CLASS TXBrwColumn

...

   for nFor := 1 to Len( ::aBitmaps )
      PalBmpFree( ::aBitmaps[ nFor, BITMAP_HANDLE ], ::aBitmaps[ nFor, BITMAP_PALETTE ] )
   next

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 203
Joined: Tue Oct 11, 2005 02:17 PM
Re: xbrowse arreglos de bugs!
Posted: Mon Jun 22, 2009 01:40 PM
He detectado un mal funcionamiento el el xbrowse que se produce en las siguientes circunstancias

Cuando un xbrowse tiene columnas ocultas, y el resto de las columnas no caben en el browse (es decir tiene columnas por la derecha fuera del espacio del control) al desplazarse con los metodos goRight y goLeft el comportamiento no es correcto y vuelve a la primera columna.

Por ejemplo:

Al programa xbposte.prg del directorio de ejemplos le oculto las dos primeras columnas y redefino los ancho de las columnas 3 y 4 ....

Code (fw): Select all Collapse
....
聽 聽oBrw:CreateFromCode()
聽 聽oWnd:oClient := oBrw
[b]
聽 聽oBrw:aCols[1]:hIDE()
聽 聽oBrw:aCols[2]:hIDE()
聽 聽ObRW:aCols[3]:nWidth := 280
聽 聽ObRW:aCols[4]:nWidth := 150[ 聽 [/b]聽 聽
ACTIVATE window oWnd


y al movernos por las celdas hacia la derecha cuando estamos en la columnas 4 en lugar de moverse hacia la cinco vuelve a la tres.
e izquierda se puede comprobar este mal comportamiento

Continue the discussion