Link to home
Start Free TrialLog in
Avatar of seitza
seitza

asked on

Delphi Programming question

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..

type
  FontRecord = record
    Color: TColor;
    Height: Integer;
    Name: TFontname;
    Pitch: TFontPitch;
    PixelsPerInch: Integer;
    Size: Integer;
    Style: TFontStyles;
  end;
  ColumnRecord = record
    ColFieldName: string[80];  // the actual name of the field
    ColWidth: integer;         // width of column
    ColFont: FontRecord;            // font
    ColTitle: string[80];    // title of column
    ColTitleFont: FontRecord;     // title font
    ColLabel: string[80];      // 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
  end;

Thank you very much for your help.   EMAIL seitza@docker.com
ASKER CERTIFIED SOLUTION
Avatar of mirek071497
mirek071497

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mirek071497
mirek071497

do you try my suggestions ?
200pt and you don't need solution?