Link to home
Start Free TrialLog in
Avatar of pr2501
pr2501

asked on

Debugger exception notification

i have made application but now i can't  resolve an problem.
To tell the true: i have made to much confusion.
Now i have problem which i can resolve while running (run) app from Delphi by clicking on continue.
I do not know what information to give to help You resolve the problem.

Thank you for understanding

continue.JPG
Avatar of MerijnB
MerijnB
Flag of Netherlands image

If you press the 'break' button, the IDE will show you the location in code where this error occured.

Can you show that to us please?
That's a TFileStream error on create constructor. The message is straightforward for the reason.
and you have no idea why you are trying to open/create a file in a directory that does not exists ?
check where your filename parameter comes from
Avatar of pr2501
pr2501

ASKER


"check where your filename parameter comes from"

How to do that?
//read note to memo1 from text file
procedure TForm2.ReadMemo(NomeFile:string);
begin
  Memo1.Lines.Clear; // clear memo1
  // add new content
  Memo1.Lines.LoadFromFile(NomeFile);

  Memo1.SelStart := Length(Memo1.Lines.Text)-1; // BREAK  Memo1.SelLength := 1;
  Memo1.SetFocus;
end;

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of MerijnB
MerijnB
Flag of Netherlands image

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 pr2501

ASKER

Memo1.SelStart := Length(Memo1.Lines.Text)-1;   //BREAK
Avatar of pr2501

ASKER

MerijnB:

with first test it looks that now is OK.

I'll let you know in a while when i'll be sure

thank you
The reason is quite simple, you tell the memo to load a file which does not exists, so it complains...