做一个文本编辑器当我新建一个文本的时候却无法将新文本保存
我的保存语法是这样的:
procedure TForm1.S1Click(Sender: TObject);
begin
if fn=' 'then
begin
savedialog1.Execute
fn:=savedialog1.FileName;
richedit1.Lines.SaveToFile(fn);
end;
if fn<>' ' then
richedit1.Lines.SaveToFile(fn);
end;
end.
当我按下保存后,系统给出的提示是:
project project2.exe raised exception class EFCreateError with message '无法创建文件' process stopped Use Step or Run to continue
--------------------------------------------------------------
请大家赐教

