hm solch eine rekursion hab ich aber nicht in der procedure drin.
sehet selbst...
Delphi-Quellcode:
procedure TForm3.SpeedButton3Click(Sender: TObject);
var Filme:array[1..maxM]of MovieType;
i:integer;
ImportMovieFile:boolean;
filename,moviefilename:string;
begin
ini := TInifile.create(ExtractFilePath(Application.exename)+inifilename);
moviefilename := ini.ReadString('Optionen','StandartPath','');
ImportMovieFile := ini.ReadBool('Optionen','ExterneFile',True);
if ImportMovieFile = True then moviefilename := ini.readstring('Optionen','ImportPath','');
ini.free;
if ImportMovieFile = True then filename := moviefilename
else filename := ExtractFilePath(Application.exename)+moviefilename;
assignfile(moviefile,filename);
if fileexists(filename) then reset(moviefile) else rewrite(moviefile);
for i := 1 to n do
begin
filme[i].name := FilmNameConvert(ListBox1.Items.Strings[i-1]);
filme[i].pfad := ListBox1.Items.Strings[i-1];
filme[i].size := Round(GetFileSize(ListBox1.Items.Strings[i-1])/1024/1024);
filme[i].format:= ComboBox2.Items.Strings[ComboBox2.ItemIndex];
filme[i].quali := ComboBox3.ItemIndex;
filme[i].datum := now;
seek(moviefile,filesize(moviefile));
write(moviefile,filme[i]);
end;
closefile(moviefile);
Form1.MoviesLoad;
end;
bei begin unter den localen variablen kommt der befehler bzw wird er angezeigt.