bug FWH 15.05 - clase TGraph
bug FWH 15.05 - clase TGraph
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
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
FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
- karinha
- Posts: 7932
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 3 times
- Contact:
Re: bug FWH 15.05 - clase TGraph
Hola Antonio:
Dime algo por favor de este bug.
Gracias.
Dime algo por favor de este bug.
Gracias.
Saludos / Regards,
FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
- Antonio Linares
- Site Admin
- Posts: 42510
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 73 times
- Contact:
Re: bug FWH 15.05 - clase TGraph
Claro:
Pasa el ratón por el gráfico.
Muchas gracias.
Code: Select all | Expand
#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
FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
- Antonio Linares
- Site Admin
- Posts: 42510
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 73 times
- Contact:
Re: bug FWH 15.05 - clase TGraph
Moisés,
Así parece solucionarse, puedes probarlo ?
Así parece solucionarse, puedes probarlo ?
Code: Select all | Expand
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
- Silvio.Falconi
- Posts: 7133
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 1 time
Re: bug FWH 15.05 - clase TGraph
seem run ok now
but why it crash with sysrefresh ?
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
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
Re: bug FWH 15.05 - clase TGraph
Antonio:
Por favor, ¿me puedes enviar al correo la clase entera corregida para probarlo?.
Muchas gracias.
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
FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
- Antonio Linares
- Site Admin
- Posts: 42510
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 73 times
- Contact:
Re: bug FWH 15.05 - clase TGraph
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.
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
FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Re: bug FWH 15.05 - clase TGraph
Hola Antonio:
¿Lo has podido arreglar por favor?.
Muchas gracias.
¿Lo has podido arreglar por favor?.
Muchas gracias.
Saludos / Regards,
FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
- Antonio Linares
- Site Admin
- Posts: 42510
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 73 times
- Contact:
Re: bug FWH 15.05 - clase TGraph
Moisés,
Asi se soluciona:
Aún así la barra inferior no muestra nada
Asi se soluciona:
Code: Select all | Expand
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