![]() |
Delphi-Version: XE5
Strange AV
Delphi-Quellcode:
There is 7 columns. Why this raises AV :?: :o
procedure TForm1.ListView1Resize(Sender: TObject);
var I: Integer; FileName: string; begin for I := 0 to ListView1.Items.Count do begin FileName := ListView1.Items[I].SubItems[4]; FileName := MinimizeName(FileName, ListView1.Canvas, ListView1.Column[5].Width); ListView1.Items[I].SubItems[4] := FileName end; end; |
AW: Strange AV
Because .Count gives you the count. Not the highest index. That would generally be Count-1, in zero based arrays and lists.
(I would be interested in how many threads here deal with this infamous off-by-one issue :)) |
Re: Strange AV
Oh my gosh! I totally did not notice it! What the completely stupid error :oops:
|
AW: Strange AV
The title of your posts I would call "bad".
And your description of the error is even worse. - Neither the error occurs - Yet what it is for an error Yes, the messages can be copied from the error messages by pressing Ctrl + C. And no, the message is not "strange". She even tells you exactly as you did wrong. Zitat:
|
AW: Re: Strange AV
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:21 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz