Roger,
This one is driving me crazy.Code has been the same on this since we wrote the program. (too long ago to remember)
We initialize here at the top of the program when it opens:
select 36
use appttype
set order to
goto top
DECLARE Alist[RECCOUNT()]
DECLARE Clist[RECCOUNT()]
Z=1
DO WHILE Z<=RECCOUNT()
STORE apptDESC TO Alist[Z]
STORE apptCODE TO Clist[Z]
Z=Z+1
SKIP
ENDDO
Get is here:
@ 15,8 DCCOMBOBOX TYPE XBPCOMBO_DROPDOWNLIST cStyp LIST aLIST SIZE 12,zn ;
ITEMSELECTED {||vdshipappt:=cList[ASCAN(aList,cStyp)],dc_getrefresh(getlist) }
Get this message when they are updating (but only on rare occasions)
oError:args :
-> VALTYPE: A VALUE: {"C", "F", "D", "N", "R", "W"}
-> VALTYPE: N VALUE: 0
oError:description : Error in array index
oError:filename :
oError:genCode : 4
oError:operation : <A of 6>[<0>]
Only happens in one location, and only once every 2000-3000 times they are in what we call our booking screen.
Does this mean that the var vdshipappt is a numeric zero? Its always one of those character codes listed. There are two such combo boxes with the same choices and it happens sometimes on one, sometimes on the other. At this point just clarifying that the program at that moment thinks the var is a numeric 0.
Thanks
Fred
Omni
Error in Array Index
Re: Error in Array Index
I need to know what line of code is causing the error?
Is this in the DC_XbpComboBox class or in your code?
Is this in the DC_XbpComboBox class or in your code?
The eXpress train is coming - and it has more cars.
Re: Error in Array Index
Here is the rest of the message.
oError:description : Error in array index
oError:filename :
oError:genCode : 4
oError:operation : <A of 6>[<0>]
CALLSTACK:
Called from (B)BOOKWIN(1096)
Called from (B)DC_MERGEBLOCKS(184)
Called from DC_GETLIST:EVENTLOOP(4704)
Called from DC_GETLIST:READGUI(3871)
Called from DC_READGUI(113)
oError:description : Error in array index
oError:filename :
oError:genCode : 4
oError:operation : <A of 6>[<0>]
CALLSTACK:
Called from (B)BOOKWIN(1096)
Called from (B)DC_MERGEBLOCKS(184)
Called from DC_GETLIST:EVENTLOOP(4704)
Called from DC_GETLIST:READGUI(3871)
Called from DC_READGUI(113)
Re: Error in Array Index
Show me your code.
Especially BookWin (1096).
There needs to be a test to make sure that the index into the array is not a ZERO value.
Especially BookWin (1096).
There needs to be a test to make sure that the index into the array is not a ZERO value.
The eXpress train is coming - and it has more cars.
Re: Error in Array Index
Hi,
Maybe a user is pressing ESCAPE in the combobox? If the value of cStyp isn't found with your ascan you could get this kind of error.
Maybe a user is pressing ESCAPE in the combobox? If the value of cStyp isn't found with your ascan you could get this kind of error.
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: Error in Array Index
I've experienced this in the past and wrapped the ascan function to return a default as I could not determine the cause.