I have encountered problems with the move from Delphi2 to Delphi3. I have a reasonably sized record that I like writing to a sequential file.
I simply used:
"var afile: file of ColumnRecord" and then wrote the records sequentially to a file with standard pascal. (Assigned the file, wrote to "afile", etc.)
Now Delphi 3 won't let me to this with my record and states that
"ColumnRecord needs finalization". I don't particularly want to rewrite the record as I would have to rewrite the rest of the software.
a) is there a way around this
b) is there a better way to write sequential records to a file
(such as objects and streams? ) If so, how would I do this?
Enclosed is the code for the record, which in itself contains a record..
FontRecord = record
ColumnRecord = record
ColFieldName: string; // the actual name of the field
ColWidth: integer; // width of column
ColFont: FontRecord; // font
ColTitle: string; // title of column
ColTitleFont: FontRecord; // title font
ColLabel: string; // label for field item
ColLabelFont: FontRecord; // font of the label
ColFieldNumber: Integer; // the table # of the field
ColVisible: boolean; // whether to print this column
ColIncludeLabel: boolean; // if true, include ColLable
ColNewLine: boolean; // starts a new line if true
ColHideIfEmpty: boolean; // include if empty
Thank you very much for your help. EMAIL email@example.com