Use SetLength first.
regards,
NIRAV KAKU
On 5 Jul 01, at 21:55, Ross Levis wrote:
> I was hoping the following would work but it appears not. It compiles
> OK but produces memory errors at runtime. Why doesn't the compiler
> complain if TSringList can't be used in an array?
>
> var
> Categories : array of TStringList;
> begin
> Categories[0] := TStringList.Create;
> end;
>
> Cheers,
> Ross.
>
> ---------------------------------------------------------------------------
> 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"
>
>
- From the Shreemat Bhägwat Gïta -
'Sarcasm is the lowest form of wit.'
---------------------------------------------------------------------------
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"