I'm updating CBT to compile with the latest Lazarus and I'm having
problems with my file generation routine from inside a component.

It calls:

procedure TChkPrinter.PrintChecks;
var
    MyFile: TextFile;
    FileName: String;
    // extraneous info removed
begin
    // more extraneous info removed
    Filename := '/tmp/cbtrack.ps';
    AssignFile(MyFile, FileName);
    rewrite(MyFile);        
    writeln(MyFile, '%!PS-Adobe-3.0');
    writeln(MyFile, '%%Creator: CBT');
    writeln(MyFile, '%%Title: Checks');
    writeln(MyFile, '%%Pages: (atend)');
    writeln(MyFile, '%%PageOrder: Ascend');
    writeln(MyFile, '/AvantGarde-Book findfont');  

    // more extraneous info removed
    closefile(MyFile);
end;

The problem is there is no error, and it does NOT create the file.  I've
tried various paths, I've pasted this code into a new form and it works
fine.

How can I figure out what's (not) going on if there's no error
generated?

-Tony

Reply via email to