![]() |
Prozedur löst exception aus...
Delphi-Quellcode:
diese Prozedur gibt mir eine Zugriffsverletzung im Speicher, und ich weiß nicht, warum das passiert. Hat jemand eine Ahnung? :?
procedure TEventClass.LoadEventsFromFile;
var i: integer; ini: TIniFile; begin ini := TIniFile.Create(ExtractFilePath(Paramstr(0)) + 'Event.ini'); for i := 0 to ndx do begin try Events[i].Name := ini.ReadString('Event' + IntToStr(i), 'Name', 'No Value'); Events[i].Description := ini.ReadString('Event' + IntToStr(i), 'Description', 'No Value'); Events[i].NotifyTime := ini.ReadInteger('Event' + IntToStr(i), 'NotifyTime', 0); Events[i].EventDateTime := ini.ReadDate('Event' + IntToStr(i), 'EventDateTime', 0); finally ini.free; end; end; end; PS: Es liegt nicht am Aufruf. Den Fehler dort hab ich bereits beseitigt :stupid: |
Re: Prozedur löst exception aus...
Versuchs mal mit
Delphi-Quellcode:
Greetz
for i := 0 to ndx-1 do
alcaeus |
Re: Prozedur löst exception aus...
Zitat:
|
Re: Prozedur löst exception aus...
Moin!
Dir ist auch bewusst, das du nach dem ersten Durchlauf die TIniFile Instanz freigegeben hast um danach noch weiterhin drauf zu zu greifen bei den weiteren Durchläufen? Ich hoffe doch... MfG Muetze1 |
Re: Prozedur löst exception aus...
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:24 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 by Thomas Breitkreuz