Without really reading your code I assume you attempt to access a NULL object in some cases:
When starting with 0 (zero based) you can't go from 0 to array.count - you will have to go from 0 to array.count-1.
Count returns the amount of "rows" and when starting with 0 the first row is the 0 not the 1, so if you count 6 rows, the last row is the row number 5.
bye
MB
When starting with 0 (zero based) you can't go from 0 to array.count - you will have to go from 0 to array.count-1.
Count returns the amount of "rows" and when starting with 0 the first row is the 0 not the 1, so if you count 6 rows, the last row is the row number 5.
bye
MB