When developing array based list-boxes it is very important that, beyond the initial declaration of the array, to not resize using the 4D array commands.
Using the listbox commands is important because direct manipulation of the size of the arrays using the array command will not sync the internal managed array of the listbox object itself. As stated in the Managing List Box Objects documentation: "This variable corresponds to a Boolean array that is automatically created and maintained by 4D."
To resize installed arrays in a listbox the listbox commands should always use v12 commands LISTBOX INSERT COLUMN and LISTBOX DELETE ROW or the v13 commands LISTBOX DELETE ROWS and LISTBOX INSERT ROWS.
Using the listbox commands instead of the array commands will keep the boolean array listbox object itself in sync with the size of the array installed in the listbox. This is very important for capturing selected rows in a list box.