Autor Beitrag
Chris Maslowski
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 109



BeitragVerfasst: Mo 28.03.05 19:27 
Ich habe ein Problem :D
Ihr seit meine einzig Rettung :lol:
In einem Programm von mir wird eine INI Datei erstellt, sollte zumindest. Denn wenn ich das Programm starte passiert nichts. Also es wird keine INI Datei erstellt. Liegt das vielleicht am Windows? Ich habs bei Linux noch net ausprobiert. Bei Windows ME hat es geklappt. Ich hab mal eine vereinfachte Version hier gepostet:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
Unit: Test;

uses
..., IniFiles, ...


...
var
a : TInifle;
...


procedure Button1Click(Sender: TObject)
begin
a . Create.IniFile('C:\windows\hallo.ini');
end;

end.


Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
wdbee
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 628
Erhaltene Danke: 1



BeitragVerfasst: Mo 28.03.05 19:32 
Die Schnipsel sind etwas lieblos ausgewählt!

ausblenden Delphi-Quelltext
1:
a := TIniFile.Create(Filename);					


Wo wird den a.free aufgerufen? Das schließt die Datei und evt. liegt es daran, dass nichts auf der Festplatte zu finden ist!

Edit: Details siehe LCS :)


Zuletzt bearbeitet von wdbee am Mo 28.03.05 19:38, insgesamt 1-mal bearbeitet
LCS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1305
Erhaltene Danke: 1

WIN 7, WIN 8
Delphi XE5, Delphi XE, Delphi 2007
BeitragVerfasst: Mo 28.03.05 19:35 
Ok, gehe direkt zurück zu den Grundlagen, gehe nicht über Forum, ziehe nicht viel Geld ein (oder so ähnlich)

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
  a := TIniFile.Create(Dateiname);
  try
     a.WriteString('EineSection', 'EinKey', 'EinWert');
     a.TuSonstWas;
     ...
  finally
     a.Free;
  end;


Gruss Lothar

---EDIT---
Da war jemand schneller
---TIDE---

_________________
Der BH ist für die Brust, der Plan ist für'n Ar...