Error en xbrowse al intentar hacer zoom

Error en xbrowse al intentar hacer zoom

Postby leandro » Sat Apr 09, 2022 4:17 pm

Hola buenos días para todos, cuando intento hacer zoom en el xbrowse sale el siguiente error:

Code: Select all  Expand view

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: Select all  Expand view


.....
.....
.....
    @ 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

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1481
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: Error en xbrowse al intentar hacer zoom

Postby nageswaragunupudi » Sun Apr 10, 2022 6: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: Select all  Expand view
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
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Error en xbrowse al intentar hacer zoom

Postby leandro » Mon Apr 11, 2022 3: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

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1481
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: Error en xbrowse al intentar hacer zoom

Postby nageswaragunupudi » Mon Apr 11, 2022 3: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
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Error en xbrowse al intentar hacer zoom

Postby Antonio Linares » Mon Apr 11, 2022 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error en xbrowse al intentar hacer zoom

Postby leandro » 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 :lol:

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 :shock:

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

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1481
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 84 guests

cron