AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

Ini laden -> Programm stürzt ab

Ein Thema von citybreaker · begonnen am 2. Okt 2004 · letzter Beitrag vom 3. Okt 2004
Antwort Antwort
Seite 2 von 2     12
Benutzerbild von APP
APP

Registriert seit: 24. Feb 2003
Ort: Graz (A)
705 Beiträge
 
Delphi 7 Enterprise
 
#11

Re: Ini laden -> Programm stürzt ab

  Alt 3. Okt 2004, 15:53
Hallo supermuckl,
zwar etwas verspätet, aber auf alle Fälle sollte das TRY/FINALLY Konstrukt so aussehen:

Code:
PROCEDURE TFigur.LoadStats;
VAR
  Ini                             : TIniFile;
BEGIN
[color=red][b] Ini := TIniFile.Create(ExtractFilePath(Application.Exename) + 'stats.ini');
  TRY[/b][/color]  
    Name_ := Ini.ReadString('Settings', 'Name', '');
    [..]
    Disziplin := Ini.ReadString('Settings', 'Disziplin', '');
  FINALLY
    Ini.Free;
  END;
END;
und irgendwann auch mal wieder monster.free falls du mehrere hast und eins stirbt mal oderso [/quote]
Armin P. Pressler

BEGIN
...real programmers are using C/C++ - smart developers Delphi;
END;
  Mit Zitat antworten Zitat
Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:37 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz