OutofBoundsException is not where I expected it!

Eureka !

The error is never where you expect it to be.

I added more columns to the ListBox,
I added more lines to the text file
I removed some indices in the read loop

I checked in the debugger…

After largely wasting my time and getting OutOfBoundsExceptions, I deleted the paintcellbackground

and the miracle arise:

no more OutOfBoundsException !

I can use that project again (I will check where the error is later)…

paint can get more rows as argument than the list may have.

1 Like

Yes, everything is possible.

But that was not the error.

What was the error?

It will have been accessing the row parameter when it had a value higher than the listcount.

I deleted the paintcellbackground...no more OutOfBoundsException !

I seek a column name and attribute its value to a variable. This is the culprit. For some reason, I am wrong coding that.

My brain is at 50%, cause I wasted some hours earlier today on the subject and I continue to be in trouble (use no coloring background shema to avoid the troubles)