bug FWH 15.05 - clase TGraph

bug FWH 15.05 - clase TGraph

Postby MOISES » Mon May 11, 2015 2:43 pm

Error description: Error BASE/1132 Error de rango: acceso al array
Args:
[ 1] = A { ... }
[ 2] = N 13

Stack Calls
===========
Called from: .\source\classes\TGRAPH.PRG => (b)TGRAPH_MOUSEMOVE( 1139 )
Called from: .\source\classes\TGRAPH.PRG => TGRAPH:MOUSEMOVE( 1140 )


Un saludo
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: bug FWH 15.05 - clase TGraph

Postby karinha » Mon May 11, 2015 3:39 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7215
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: bug FWH 15.05 - clase TGraph

Postby MOISES » Thu May 14, 2015 3:17 pm

Hola Antonio:

Dime algo por favor de este bug.

Gracias.
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: bug FWH 15.05 - clase TGraph

Postby Antonio Linares » Thu May 14, 2015 4:57 pm

Moisés,

Tienes un ejemplo para reproducir el bug ? gracias
regards, saludos

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

Re: bug FWH 15.05 - clase TGraph

Postby MOISES » Thu May 14, 2015 8:14 pm

Claro:

Code: Select all  Expand view


#include "Fivewin.ch"
#include "TGraph.ch"


FUNCTION MAIN()

    LOCAL oDlg, oGraph

    DEFINE DIALOG oDlg;
           SIZE 600, 500

    @ 1, 1 GRAPH oGraph;
           SIZE 250, 200;
           TYPE 1;
           YVALUES 3D XGRID YGRID XVALUES LEGENDS


    oGraph:aSeries = { { "Serie 1", CLR_CYAN ,, },;
                       { "Serie 2", CLR_YELLOW,, },;
                       { "Serie 3", CLR_HRED,, } }


    oGraph:aData = { { 14280, 20420, 12870, 25347, 7640 },;
                     { 8350, 10315, 15870, 5347, 12340 },;
                     { 12345, -8945, 10560, 15600, 17610 } }

    oGraph:nClrX = CLR_GREEN
    oGraph:nClrY = CLR_RED

/*
    oGraph:cToolTip =  { | nAt, nSerie, nIndex | nSerie := If( nAt % ;
                         Len( oGraph:aSeries ) == 0, Len( oGraph:aSeries ),;
                         Int( nAt % Len( oGraph:aSeries ) ) ),;
                         "Series: " + Alltrim( Str( nSerie ) ) + CRLF + ;
                         "Bar: " + AllTrim( Str( nIndex := Int( nAt / Len( oGraph:aSeries ) ) + 1 + ;
                         If( nAt % Len( oGraph:aSeries ) == 0, -1, 0 ) ) ) + CRLF + ;
                         "Value: " + AllTrim( Str( oGraph:aData[ nSerie ][ nIndex ] ) ) }
*/

    @ 0, 0 BUTTON "Cambia" ACTION sysrefresh()  

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL

 



Pasa el ratón por el gráfico.

Muchas gracias.
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: bug FWH 15.05 - clase TGraph

Postby Antonio Linares » Fri May 15, 2015 8:07 am

Moisés,

Así parece solucionarse, puedes probarlo ?

Code: Select all  Expand view
METHOD MouseMove( nRow, nCol, nFlags ) CLASS TGraph

   local nAt := 0

   if ! Empty( ::aBarCoors )
      nAt = AScan( ::aBarCoors,;
         { | aCoors | nRow <= aCoors[ 2 ] .and. ;
                      nRow >= aCoors[ 2 ] - aCoors[ 3 ] .and. ;
                      nCol >= aCoors[ 1 ] .and. ;
                      nCol <= aCoors[ 1 ] + aCoors[ 4 ] } )
      if nAt != 0
         if Len( ::aData[ 1 ] ) >= nAt
            DEFAULT ::cToolTip := { | nAt | AllTrim( Transform( ::aData[ 1 ][ nAt ],;
                                    "999,999,999.99" ) ) }
            ::ShowToolTip( nRow, nCol, Eval( ::cToolTip, nAt ) )
         endif                 
      else
         ::DestroyTooltip()  
      endif  
   endif                  
                                 
return nil
 
regards, saludos

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

Re: bug FWH 15.05 - clase TGraph

Postby Silvio.Falconi » Fri May 15, 2015 4:53 pm

seem run ok now

but why it crash with sysrefresh ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6774
Joined: Thu Oct 18, 2012 7:17 pm

Re: bug FWH 15.05 - clase TGraph

Postby MOISES » Mon May 18, 2015 3:49 pm

Antonio:

Por favor, ¿me puedes enviar al correo la clase entera corregida para probarlo?.

Muchas gracias.
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: bug FWH 15.05 - clase TGraph

Postby Antonio Linares » Mon May 18, 2015 5:01 pm

Moisés,

Enviada
regards, saludos

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

Re: bug FWH 15.05 - clase TGraph

Postby MOISES » Sat May 23, 2015 7:10 am

Hola Antonio:

En efecto, el error no se produce.

Sin embargo, activando los oGraph:cToolTip, sólo funciona en la parte de la izquierda, si se coloca el mouse en las barras de la mitad derecha no se muestra nada.

Muchas gracias.
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: bug FWH 15.05 - clase TGraph

Postby MOISES » Wed May 27, 2015 5:46 pm

Hola Antonio:

¿Lo has podido arreglar por favor?.

Muchas gracias.
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: bug FWH 15.05 - clase TGraph

Postby Antonio Linares » Wed May 27, 2015 7:25 pm

Moisés,

Asi se soluciona:
Code: Select all  Expand view
METHOD MouseMove( nRow, nCol, nFlags ) CLASS TGraph

   local nAt := 0

   if ! Empty( ::aBarCoors )
      nAt = AScan( ::aBarCoors,;
         { | aCoors | nRow <= aCoors[ 2 ] .and. ;
                      nRow >= aCoors[ 2 ] - aCoors[ 3 ] .and. ;
                      nCol >= aCoors[ 1 ] .and. ;
                      nCol <= aCoors[ 1 ] + aCoors[ 4 ] } )
      if nAt != 0
         DEFAULT ::cToolTip := { | nAt | AllTrim( Transform( ::aData[ 1 ][ nAt ],;
                                 "999,999,999.99" ) ) }
         ::ShowToolTip( nRow, nCol, Eval( ::cToolTip, nAt ) )
      else
         ::DestroyTooltip()  
      endif  
   endif                  
                                 
return nil
 


Aún así la barra inferior no muestra nada
regards, saludos

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


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 79 guests