FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Error en xbrowse al intentar hacer zoom
Posts: 1816
Joined: Wed Oct 26, 2005 02:49 PM
Error en xbrowse al intentar hacer zoom
Posted: Sat Apr 09, 2022 04:17 PM
Hola buenos d铆as para todos, cuando intento hacer zoom en el xbrowse sale el siguiente error:

Code (fw): Select all Collapse
Application
===========
聽 聽Path and name: C:\dlyma\hymlyma.exe (32 bits)
聽 聽Size: 7,605,248 bytes
聽 聽Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20190613)
聽 聽FiveWin 聽version: FWH 19.09
聽 聽C compiler version: Borland/Embarcadero C++ 7.3 (32-bit)
聽 聽Windows version: 6.2, Build 9200 

聽 聽Time from start: 0 hours 0 mins 2 secs 
聽 聽Error occurred at: 09/04/2022, 11:12:32
聽 聽Error description: Error BASE/1082 聽Error de argumento: -
聽 聽Args:
聽 聽 聽[ 聽 1] = U 聽 
聽 聽 聽[ 聽 2] = N 聽 14.00

Stack Calls
===========
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:CHECKSIZE( 1312 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT( 2101 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY( 2042 )
聽 聽Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1767 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11223 )
聽 聽Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
聽 聽Called from: 聽=> DIALOGBOXINDIRECTW( 0 )
聽 聽Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
聽 聽Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 436 )
聽 聽Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 23 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:CHECKSIZE( 1312 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:ADJUST( 1419 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:RECALCWH( 8906 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:FONTSIZE( 8884 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:KEYDOWN( 3458 )
聽 聽Called from: 聽=> TWINDOW:HANDLEEVENT( 0 )
聽 聽Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1801 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11223 )
聽 聽Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
聽 聽Called from: 聽=> WINRUN( 0 )
聽 聽Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1097 )
聽 聽Called from: z:\prg\R32_menu.prg => INICIONUEVO( 1299 )
聽 聽Called from: z:\prg\R32_menu.prg => MAIN( 100 )

Como defino el xbrowse
Code (fw): Select all Collapse
.....
.....
.....
聽 聽 @ 63 , 7 XBROWSE oBrw ;
聽 聽 SIZE 156 , 70 OF oDlg PIXEL ;
聽 聽 DATASOURCE aEmpresas ;
聽 聽 COLUMNS 1, 2;
聽 聽 LINES STYLE FLAT NOBORDER

聽 聽 WITH OBJECT oBrw
聽 聽 聽 聽 :lRecordSelector 聽 聽聽 聽 := .T.
聽 聽 聽 聽 :lHScroll 聽 聽 聽 聽聽 聽:= .F.
聽 聽 聽 聽 :lVScroll 聽 聽 聽 聽聽 聽:= .T.
聽 聽 聽 聽 :l2007 聽 聽 聽 聽 聽 聽 聽:= .F.
聽 聽 聽 聽 :lFitGridHeight 聽聽 聽聽 聽 := .T.
聽 聽 聽 聽 :nHeaderHeight 聽 聽 聽聽 聽 := 21
聽 聽 聽 聽 :nRowHeight 聽 聽 聽聽 聽:= 21
聽 聽 聽 聽 :nMarqueeStyle 聽 聽 聽聽 聽 := MARQSTYLE_HIGHLROW
聽 聽 聽 聽 :lColDividerComplete 聽 聽:= .t.
聽 聽 聽 聽 :nColorPen 聽 聽 聽 聽 聽:= CLR_HGRAY
聽 聽 聽 聽 :lFullGrid 聽 聽 聽 聽 聽:= .T.
聽 聽 聽 聽 :nStretchCol 聽 聽 聽 聽聽 聽 := STRETCHCOL_LAST
聽 聽 聽 聽 :bClrHeader 聽 聽 聽 聽 聽 聽 := { || { CLR_WHITE, Rgb( 0,120,215 ), CLR_HGRAY } }
聽 聽 聽 聽 :nRecSelColor 聽 聽 聽 聽 聽 := RGB( 255, 255, 255 )
聽 聽 聽 聽 :bClrSelFocus 聽 聽 聽 聽 聽 := { || { Rgb(55,55,55), RGB( 185, 220, 255 ) } }
聽 聽 聽 聽 :bClrStd 聽 聽 聽 聽 聽 聽:= { || { Rgb(55,55,55), CLR_WHITE } }聽 聽 聽 聽 聽 
聽 聽 聽 聽 :SetFont( oFontSe1 )
聽 聽 聽 聽 :CreateFromCode()
聽 聽 聽 聽 :bChange 聽 聽 聽 聽 聽 聽:= {|| EVAL(cbSelEmpresa) }聽
聽 聽 聽 聽 :lAutoSort 聽聽 聽 聽 聽 := .t.
聽 聽 聽 聽 :lIncrFilter 聽 聽聽 聽 := .t.
聽 聽 聽 聽 :lSeekWild 聽聽 聽 聽 聽 := .t.
聽 聽 聽 聽 :bKeyDown 聽 聽 聽 聽 聽聽:= {|nKey,oGet,nCol|TeclasIni(nKey,oGet,nCol,oBrw)}
聽 聽 聽 聽 //:bKeyDown 聽 聽 聽 聽 聽 聽 := {|nKey| if(nKey == VK_DELETE, ( oBrw:Seek( "" ), oBrw:GoTop() ), ) }聽聽 聽 
聽 聽 聽 聽 :aCols[1]:bLClickHeader := {|| oBrw:Seek( "" ), oBrw:cFilterFld := "C贸d", oBrw:nColSel := 1, oBrw:GoTop() }
聽 聽 聽 聽 :aCols[2]:bLClickHeader := {|| oBrw:Seek( "" ), oBrw:cFilterFld := "Nombre", oBrw:nColSel := 2, oBrw:GoTop() }
聽 聽 聽 聽 
聽 聽 END

聽 聽 WITH OBJECT oBrw:aCols[ 1 ]
聽 聽 聽 聽 :bStrData := {|| if(Len( aEmpresas ) > 0 , alltrim(aEmpresas[oBrw:nArrayAt]["e_codi"]) , "" ) } 聽 
聽 聽 聽 聽 :cHeader 聽= "C贸d"
聽 聽 聽 聽 :nWidth 聽 = 30
聽 聽 聽 聽 :nHeadStrAlign = AL_LEFT
聽 聽 聽 聽 :nDataStrAlign = AL_LEFT聽 聽 
聽 聽 聽 聽 :oHeaderFont = oFontSes 聽
聽 聽 END 聽
聽 聽 
聽 聽 WITH OBJECT oBrw:aCols[ 2 ]聽
聽 聽 聽 聽 :bStrData := {|| if(Len( aEmpresas ) > 0 , alltrim(aEmpresas[oBrw:nArrayAt]["e_nomb"]) , "" ) } 聽 
聽 聽 聽 聽 :cHeader 聽= "Nombre"
聽 聽 聽 聽 :nWidth 聽 = 210
聽 聽 聽 聽 :nHeadStrAlign = AL_LEFT
聽 聽 聽 聽 :nDataStrAlign = AL_LEFT聽 聽 
聽 聽 聽 聽 :oHeaderFont = oFontSes
聽 聽 END
....
....
...
Saludos
LEANDRO AREVALO
Bogot谩 (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 25.01 ] [ xHarbour 64 bits) ]
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Error en xbrowse al intentar hacer zoom
Posted: Sun Apr 10, 2022 06:21 PM
You get this error if :lFitGridHeight is set to .T.
This error is fixed in FWH2203.

For now, you can avoid this error by keeping :lFitGridHeight := .F.

Please see
viewtopic.php?f=3&t=41583

You can also modify xbrowse.prg by substituting the existing method CheckSize() with this new method:
Code (fw): Select all Collapse
METHOD CheckSize()  CLASS TXBrowse

   local aRect
   local nGap

   if ( ::nRightMargin != nil .or. ::nBottomMargin != nil ) .and. !( ::oWnd:oClient == Self )
      aRect    := GetClientRect( ::oWnd:hWnd )
      if ::nRightMargin != nil
         ::nWidth       := aRect[ 4 ] - ::nRightMargin - ::nLeft
      endif
      if ::nBottomMargin != nil
         ::nHeight      := aRect[ 3 ] - ::nBottomMargin - ::nTop
      endif

   endif

   if ::nHeaderPad > 0 .and. ::nHeaderHeight != nil
      ::nHeaderHeight   -= ::nHeaderPad
   endif
   if ::nFooterPad > 0 .and. ::nFooterHeight != nil
      ::nFooterHeight   -= ::nFooterPad
   endif
   ::nHeaderPad := ::nFooterPad := 0

   if ::lAdjusted .and. ::lFitGridHeight .and. ;
      ( ( ::lHeader .and. ::nHeaderHeight > 1 ) .or. ::lFooter )

      if ( nGap  := ::DataRect:nHeight % ::nRowHeight ) > 0

         if ::lHeader .and. ::nHeaderHeight > 1
            if ::lFooter
               ::nFooterPad   := Int( nGap * ::nFooterHeight / ( ::nHeaderHeight + ::nFooterHeight ) )
               ::nHeaderPad   := nGap - ::nFooterPad

//                ::nFooterHeight   += ::nHeaderPad // bug fixed 2018-07-10
//                ::nHeaderHeight   += ::nFooterPad

               ::nFooterHeight   += ::nFooterPad   // bug fixed 2018-07-10
               ::nHeaderHeight   += ::nHeaderPad

            else
               ::nHeaderHeight   += ( ::nHeaderPad := nGap )
            endif
         else
            ::nFooterHeight   += ( ::nFooterPad := nGap )
         endif
      endif
   endif

return Self
Regards



G. N. Rao.

Hyderabad, India
Posts: 1816
Joined: Wed Oct 26, 2005 02:49 PM
Re: Error en xbrowse al intentar hacer zoom
Posted: Mon Apr 11, 2022 03:34 PM

Mr. Nages, efectivamente se soluciona cambiando el valor de la variable :lFitGridHeight := .T., pero no me gusta como se ve el xbrowse con ese espacio en blanco en la parte de abajo.

Tambi茅n intente incluir la clase con ese ajuste que sugieres, pero cuando intento compilar dice que la clase esta doble.

Por otro lado, no hemos podido actualizar a la ultima versi贸n de FW por que tenemos muchos problemas con el tema del memoedit() y tambi茅n con los get que tienen la cl谩usula ACTION.

Por otro lado mientas solucionamos alguna de las dos cosas, me gustar铆a saber si puedo bloquear el ZOOM en el xbrowse?

Saludos
LEANDRO AREVALO
Bogot谩 (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 25.01 ] [ xHarbour 64 bits) ]
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Error en xbrowse al intentar hacer zoom
Posted: Mon Apr 11, 2022 03:58 PM
Tambi茅n intente incluir la clase con ese ajuste que sugieres, pero cuando intento compilar dice que la clase esta doble.
ENGLISH
I also tried to include the class with that setting you suggest, but when I try to compile it says that the class is double.


Please do NOT ADD this as new method. Replace the existing method CheckSize() with the revised method I provided. Other user in the posting I referred replaced the method and all is ok for him.
Regards



G. N. Rao.

Hyderabad, India
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error en xbrowse al intentar hacer zoom
Posted: Mon Apr 11, 2022 05:45 PM

Estimado Leandro,

> los get que tienen la cl谩usula ACTION.

Puedes poner alg煤n ejemplo ?

muchas gracias

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1816
Joined: Wed Oct 26, 2005 02:49 PM
Re: Error en xbrowse al intentar hacer zoom
Posted: Mon Apr 11, 2022 10:53 PM
Antonio buenas tardes como vas?

Perd贸name me equivoque no es en la clausula ACTION es en el PICTURE.

Ese error yo la hab铆a reportado desde el a帽o pasado :-)

http://forums.fivetechsupport.com/viewtopic.php?f=6&t=40510&start=0&hilit=leandro+bug&sid=66c56a6880c30a26120619364852452e

Intente montar un ejemplo como me lo pido Mr. Nages, el ejemplo que monte, si funciona, haciendo un solo prg para el ejemplo. Lo que implica que hay algo, una funci贸n o lib que no se agrega, o que se actualizo y me esta afectando. Es algo que afecta a toda la aplicaci贸n y sucede desde que intentamos hacer el cambio de versi贸n, con la versi贸n FW.1909 funciona de maravilla.

El otro problema que tenemos es la incompatibilidad de memoedit(), eso es peor que lo de los GETS :-)

Tu me recomendaste que hiciera un ajuste, pero este no me funciono :-)
Aunque ya deja compilar los resultados al momento de llamar memoedit() y sus funciones pares como memowrite() memoread() en otras, no son los esperados.

http://forums.fivetechsupport.com/viewtopic.php?f=16&t=40470&p=241814&hilit=leandro+memoedit&sid=17aca7f9a668c0522ea84c212f3f7761&sid=66c56a6880c30a26120619364852452e#p241814

y algunos de los procesos de los Web Service se basan esta funciones, lo que nos afecta al momento de emitir las facturas electr贸nicas.

Muchas gracias de antemano
Saludos
LEANDRO AREVALO
Bogot谩 (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 25.01 ] [ xHarbour 64 bits) ]

Continue the discussion