Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Ini Readstring klappt nicht :( (https://www.delphipraxis.net/79788-ini-readstring-klappt-nicht.html)

hedie 28. Okt 2006 12:05


Ini Readstring klappt nicht :(
 
Hallo

Ich habe folgendes gemacht

Delphi-Quellcode:
procedure TForm2.ListBox1Click(Sender: TObject);
var
iindex:integer;
checkname:String;
begin
iindex := listbox1.ItemIndex;
checkname := listbox1.Items[iindex] ;
form1.IdFTP1.Get(checkname+'.ini','userlog.dat',true);

with TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'userlog.dat') do
  try
  Edit1.Text := ini.ReadString('Gebot','Startgebot','0');
  finally
   Free;
  end;

end;
Immer wenn ich diese funktion aufrufe und es den wert einfügen soll kommt eine zugrifsverletzung weshalb wohl?

vielen dank

Hawkeye219 28. Okt 2006 12:13

Re: Ini Readstring klappt nicht :(
 
Hallo hedie,

der Zugriff auf die Variable ini ist wahrscheinlich nur ein Überbleibsel aus einer früheren Version deines Codes. Durch die WITH-Anweisung ist er überflüssig und verursacht wohl den Fehler.

Gruß Hawkeye

hedie 28. Okt 2006 12:15

Re: Ini Readstring klappt nicht :(
 
Suuuuuuppppperrrr vielen dank echt super :D :D

Du hast recht :D

danke hat geklappt


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:54 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