The declaration of the type is:
type TMediaLibrary = record Title:string; TrackNo:integer; Artist:string; Album:string; Year:string; Genre:string; Comment:String; Directory:string; end; var SongInfo: TMediaLibrary;
and the file implementation of it is here:
procedure TForm1.Button1Click(Sender: TObject); var SongFile:string; MediaLibrary: file of TMediaLibrary; <<<Error is here begin . . . . AssignFile(MediaLibrary, 'C:\Program Files\toMedia Player\data\libr.db'); rewrite(MediaLibrary); Write(MediaLibrary, SongInfo); CloseFile(MediaLibrary); end;
My problem is that when i try to compile the code it gives the error "Type TMediaLibrary needs finalization - not allowed in file type". This is my first post on any coding community site as most problems have already been solved already, but this has stumped me and google.
Thanks alot for any help.