On Sun, 14 Mar 2004 11:04:34 -0800 Taj Morton <[EMAIL PROTECTED]> wrote:
> Hi all, > This code has been driving me nuts for the past week. You have to add them to the list, before you can access them. > IDs:=TStringList.Create; Creates a list without elements > for i:=0 to Datab.List_Field.Count-1 do > begin > Tmp:=TStringList(Datab.List_Field.items[i]); > IDs.Strings[i]:=Tmp.Strings[0]; Instead do: IDs.Add(Tmp.Strings[0]); > Tmp.Free; > end; > > It crashes with > An unhandled exception occurred at 0x08062FE5 : > ESTRINGLISTERROR : List index exceeds bounds (0) > 0x08062FE5 > > Datab.List_Field.Count-1=18. It appears that IDs is not letting me write to > item i. Any ideas? > Thanks, Taj Vincent. _______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal