he estado haciendo algo con tgraph y me encontre con que siempre me da un error en el método MouseMove, lo solucioné poniendo una variable local y midiendo un limite si a alguien le sirve
- Code: Select all Expand view
METHOD MouseMove( nRow, nCol, nFlags ) CLASS TGraph
local nAt := 0
local nLen := 0 //esto aumente
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
nLen = len( ::aData[ 1 ] ) //aumentado
if nAt > nLen //aumentado
nAt = nLen //aumentado
else //aumentado
DEFAULT ::cToolTip := { | nAt | AllTrim( Transform( ::aData[ 1 ][ nAt ],;
"999,999,999.99" ) ) }
::ShowToolTip( nRow, nCol, Eval( ::cToolTip, nAt ) )
end//aumentado
else
::DestroyTooltip()
endif
endif
return nil
el error era el siguiente al pasar el mouse en el grafico me daba
Application
===========
Path and name: d:\sistemas\josenet\bi\josenet_bi.exe (32 bits)
Size: 5,213,696 bytes
Compiler version: Harbour 3.2.0dev (Rev. 18917)
FiveWin Version: FWH 15.01
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 22 secs
Error occurred at: 23/09/2015, 13:26:57
Error description: Error BASE/1132 Bound error: array access
Args:
[ 1] = A { ... } length: 12
[ 2] = N 13
Stack Calls
===========
Called from: .\source\classes\TGRAPH.PRG => (b)TGRAPH_MOUSEMOVE( 1139 )
Called from: .\source\classes\TGRAPH.PRG => TGRAPH:MOUSEMOVE( 1140 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TGRAPH:HANDLEEVENT( 1733 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3450 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 286 )
Called from: josenet_bi.prg => TWG_BIGRAPH:DIALOG_ANIOMES( 197 )
Called from: josenet_bi.prg => (b)TWG_BI_MAKEMAIN( 86 )
Called from: josenet_bi.prg => (b)TWG_BI_MAKEMAIN( 104 )
Called from: .\source\classes\TRBTN.PRG => TRBTN:CLICK( 715 )
Called from: .\source\classes\TRBTN.PRG => TRBTN:LBUTTONUP( 924 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1723 )
Called from: .\source\classes\TRBTN.PRG => TRBTN:HANDLEEVENT( 1597 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3450 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1152 )
Called from: josenet_bi.prg => TWG_BI:MAKEMAIN( 155 )
Called from: josenet_bi.prg => MAIN( 26 )
System
======
CPU type: Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz 1800 Mhz
Hardware memory: 3976 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Windows total applications running: 5
1 ,
2 , C:\WINDOWS\SYSTEM32\shcore.dll
3 , C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.10240.16384_none_3bccb
4 , d:\sistemas\josenet\bi\josenet_bi.exe
5 DDE Server Window, C:\WINDOWS\SYSTEM32\OLE32.DLL
Variables in use
================
Procedure Type Value
==========================
(b)TGRAPH_MOUSEMOVE
Param 1: O Class: ERROR
TGRAPH:MOUSEMOVE
saludos
Wilson