Board index » delphi » Converting 16-bit app to 32-bit; EAccessViolation

Converting 16-bit app to 32-bit; EAccessViolation

Hello,

I've just upgraded to Delphi 2.01 and I'm having
some problems converting existing code:

Specifically, I get an EAccessViolation when I try
to access information in a TStringList in this way:

if ExampleStringList.Strings[AnInteger][1] := '[' then {...}

Why doesn't this work? I worked perfectly in Delphi 1!

I'd appreciate any help...
____________________________________________

           -=|David Polberger|=-
____________________________________________

.oO staffan.polber...@mailbox.swipnet.se Oo.
.oO      http://mmplayer.home.ml.org     Oo.

 

Re:Converting 16-bit app to 32-bit; EAccessViolation


Quote
David Polberger wrote:

> Hello,

> I've just upgraded to Delphi 2.01 and I'm having
> some problems converting existing code:

> Specifically, I get an EAccessViolation when I try
> to access information in a TStringList in this way:

> if ExampleStringList.Strings[AnInteger][1] := '[' then {...}

> Why doesn't this work? I worked perfectly in Delphi 1!

        Are you certain that AnInteger is a valid index?
(I guess that wouldn't give an EAcessViolation). Are
you certain that it's what you say and not

if ExampleStringList.Strings[AnInteger][0] := '[' then {...}

??? That would have been valid (although somewhat curious)
in D1 but not in D2.

--
David Ullrich

?his ?s ?avid ?llrich's ?ig ?ile
(Someone undeleted it for me...)

Other Threads