Hi James

I believe this will not work either. Someone pointed out that properties cannot be used as var parameters or in the readln procedure. It works fine in with writeln however.

Cheers,
Ross.

James Low wrote:

Ross, I tend to solve this problem by setting up form level Read, Write
properties that handle writing to the text box. ie:

Property myProperty : String Read GetmyProperty Write SetmyProperty;

myForm.SetmyProperty(Value : String);
Begin
myTextbox.text := Value;
end;

Your code example then becomes:

Readln(MyTextfile, myProperty);

Hope this helps.

Regards.
-----Original Message-----
From: Ross Levis [mailto:[EMAIL PROTECTED]]
Sent: 23 November 2002 13:30
To: Multiple recipients of list delphi
Subject: [DUG]: TEdit.Text


I'm finding it a hassle that I can't pass TEdit.Text strings as Var parameters in procedures, and can't specify them in readln commands.

With Var parameters, I receive the compiler error "Constant Object cannot be passed as a var parameter.
With Readln(MyTextfile, MyEdit.Text), I receive the compiler error "Left side cannot be assigned to".

Is there anyway around these problems or am I stuck with using string variables and assigning the Text field from the string?

Cheers,
Ross.

---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
Notice of Legal Status and Confidential Information: This electronic mail
message and any accompanying attachments may contain information that is
privileged and CONFIDENTIAL. If you are not the intended recipient you are
advised that any use, review, dissemination, distribution or reproduction of
the information is strictly prohibited and may be unlawful. If you have
received this document in error, please notify the sender immediately and
destroy the message.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/



---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to