[Lazarus] Ok I give up!

Reinier Olislagers reinierolislagers at gmail.com
Sat Mar 2 15:11:59 CET 2013


On 2-3-2013 14:49, appjaws wrote:
> On 02/03/13 12:16, Reinier Olislagers wrote:
>> On 2-3-2013 13:05, appjaws wrote:
>>> Hi,
>>> How do you write the contents of a Memo to a file and read back into a
>>> Memo?
>> Memo1.Lines.SaveToFile
>> Memo1.Lines.LoadFromFile
> 
> I tried the following line but I just get an error message :-
> Call.pas(87,17) Error: Illegal qualifier
> 
> MemoCallNote.Lines.SaveToFile ('/home/paul/tmpinfo/MyTempFile.txt');
So is MemoCallNote a TMemo? What text is exactly at line 87, position 17?

If I drop a memo and a button on a form and assign this to the button's
OnClick event:
procedure TForm1.Button1Click(Sender: TObject);
begin
  Memo1.Lines.SaveToFile('d:\cop\t\test.txt');
end;
... it works (on my windows machine - you'd obviously have to change the
path on Linux).

>>> Another thing how can I find out legal qualifiers i.e. Memo.Clear ,
>>> Memo.Text (both illegal). What is legal?
>> Type Memo. then press ctrl-space, then identifier completion will show
>> you legal qualifiers.
> 
> I didn't fine .Lines.SaveToFile?
But did you find Lines? After Lines, do the same for .SaveToFile

I'm starting to suspect that what you think is a memo may not actually
be a memo.

If you want to, you can upload your project as a zip somewhere and I'll
have a look...

>> Finally, built in help is a nice aid: with your cursor on TMemo, press
>> F1 and you'll see properties and methods that are available.
> 
> I don't think my built in help is working, F1 does nothing.
What version of Lazarus are you using - post 1.0 should have built in help.

> How do I enable built in help?
http://wiki.lazarus.freepascal.org/Installing_Help_in_the_IDE





More information about the Lazarus mailing list