function TFileEditor.Print : Boolean;
var
i : word;
begin
if CurPtr <> 0 then begin
i := 0;
while i <= CurPtr do begin
write(lst, Buffer^[i]);
Inc(i);
end;
end;
i := CurPtr+GapLen;
while i < GapLen+BufLen do begin
write(lst, Buffer^[i]);
Inc(i);
end;
if IOResult <> 0 then EditorDialog(edPrintError, @FileName) else
Print := TRUE;
end;
const
edPrintError = 11;
or something similar to the interface.