> var
> iColCount : Integer;
> begin
> iColCount:=high(fGridArray[Row]);
> iColCount:=iColCount + 1
> SetLength(fGridArray[row],iColCount);
> end;
>
> I cant see WHY this sould be a problem...seems straight forward, but it just
> wont set thge new value !
> infact, it SEEMED to have set it then next time it was back to the original
> value...
Indexes for dynamic arrays are numbered 0..(length-1)
so SetLength(fGridArray,10,20)
declares an array with 10 rows (0..9) each of 20 elements (0..19)
So in the code above
iColCount := high(fGridArray[Row]);
Gives iColCount := 19;
iColCount := iColCount + 1;
Gives iColCount := 20;
SetLength(fGRidArray[Row],iColCount);
is setting the array to the same length as it currently is...
Use SetLength(fGridArray[Row],Length(fGridArray[Row])+1);
--
Aaron@home
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"