Beijer Electronics (formerly QSI Corporation)
http://www.qsiforums.com/

DataGridV2 Scroll Bar Exception
http://www.qsiforums.com/viewtopic.php?f=6&t=4466
Page 1 of 1

Author:  kkwon [ Thu Jun 14, 2012 7:53 am ]
Post subject:  DataGridV2 Scroll Bar Exception

Hi,
Using the QTerm A12 panel and Qlarity 2.64.

Using a datagridV2 object, instance DataGrid_SysParams, and it is generating an exception via the _ScrollBarSetLimit function at the following line:
sb[_SB_ItemCount] := newLimit
_SB_ItemCount is an enum of value 2, but stepping through the code an array index out of bounds exception occurs:
Exception 98: Interpreter: Illegal index into an array (severity: 5) ( in library --basic: scrollbarsupport line 432)

DataGrid_SysParams has 40 rows and 4 columns, the initialization is as follows:
init parent := tabs_sysparams
init numColumns := 4
init numRows := 40
init curRow := 0
init curCol := 0
init numFixedRows := 0
init firstVisRow := 1
init firstVisCol := 0
init xpos := 75
init ypos := 57
init width := 650
init height := 530
init defaultFgColor := 0
init defaultBgColor := 0
init borderstyle := Bdr_CheckBoxBorder
init font := default_ttf
init defaultcellwidth := 160
init cellheight := 40
init lineColor := 110
init inactive := true
init disallowFocus := true
init enabled := true
init defaultcolumnyjustify := vjustify_center
init scrollbgcolor := 11
init selectedcellfgcolor := 0
init fixedcelldefaultbgcolor := 0
init voidcolor := 0
init selectedcellbgcolor := 0
init scrollfgcolor := 255
init ptsize := 10
init scrollbarsize := 16
init initialcolumnformat := ",200,L,C;,150,L,C;,150,L,C;,150,L,C;"

The data grid Initializing() function is doing a resize as follows:
DataGrid_SysParams .Resize(40,4).

Any ideas on how to correct this?

Author:  Ron L. [ Thu Jun 14, 2012 10:28 am ]
Post subject:  Re: DataGridV2 Scroll Bar Exception

You might be using the DataGridV2 object before it's been initalized. Make sure it's initialized before using any of its properties or methods. If you still need help, send a workspace that demonstrates the problem.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/