i have this code in a page tab of a form :
@ 10, 10 BROWSE o_GRID_01 ARRAY OF o_TAB_1 ; ID 1700 ; SIZE 1050, 570
the array is a static array a_STATISTICS charged in a routine loadrow()
at the end of the routine loadrow() i could check if there are elements in the array
if there are some elementes
i put this code
hwg_CreateArList( o_GRID_01, a_STATISTICS )
o_GRID_01:aColumns[ 1]:heading := "Column a" o_GRID_01:aColumns[ 2]:heading := "Column b" o_GRID_01:aColumns[ 3]:heading := "Column c" o_GRID_01:aColumns[ 4]:heading := "Column d" * setting the correct tab o_TAB_1:SetTab( 2 )
and all works fine.
the problem arise when i remake the selection and restart the same routine loadrow()
i receive this error
Error BASE/1132 Bound error: array access
Called from (b)HWG_COLUMNARBLOCK(2092)
Called from FLDSTR(1933)
Called from HBROWSE:LINEOUT(1099)
Called from HBROWSE:PAINT(742)
Called from HBROWSE:ONEVENT(315)
Called from HWG_ACTIVATEDIALOG(0)
Called from HDIALOG:ACTIVATE(176)
what i'm doing wrong ?
regards
domenico
problem solved reading samples ;-) :
the code have to be :
o_GRID_01: Active := .F. <--------
hwg_CreateArList( o_GRID_01, a_STATISTICS )
o_GRID_01:aColumns[ 1]:heading := "Column a"
o_GRID_01:aColumns[ 2]:heading := "Column b"
o_GRID_01:aColumns[ 3]:heading := "Column c"
o_GRID_01:aColumns[ 4]:heading := "Column d"
o_GRID_01: Active := .T. <--------
o_GRID_01: Refresh() <--------
o_TAB_1:SetTab( 2 )
close the ticket
regards