<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Because a property hides the implementation details ... you can
change to read / write methods later with no change to the code that
is using the property. A public field exposes the implementation.<br>
<br>
Cheers<br>
<br>
D<br>
<br>
<br>
On 21/01/11 00:44, Ross Levis wrote:
<blockquote cite="mid:007401cbb897$6fc56110$4f502330$@com"
type="cite">
<meta http-equiv="Context-Type" content="text/html;
charset=us-ascii">
<div>
<p><span>I
don’t see the point in doing that, unless the read/write are
functions or
procedures. Just make the string public. </span></p>
<p><span> </span></p>
<div>
<div>
<p><b><span lang="EN-US">From:</span></b><span lang="EN-US">
<a class="moz-txt-link-abbreviated" href="mailto:delphi-bounces@delphi.org.nz">delphi-bounces@delphi.org.nz</a>
[<a class="moz-txt-link-freetext" href="mailto:delphi-bounces@delphi.org.nz">mailto:delphi-bounces@delphi.org.nz</a>] <b>On Behalf Of </b>David
Moorhouse (DUG)<br>
<b>Sent:</b> Thursday, 20 January 2011 11:18 PM<br>
<b>To:</b> NZ Borland Developers Group - Delphi List<br>
<b>Subject:</b> Re: [DUG] Variabels stored </span></p>
</div>
</div>
<p> </p>
<p>Or as field properties if you
want to access them from another form ... </p>
<div>
<p>type </p>
</div>
<div>
<p> TWallaceForm = class(TForm) </p>
</div>
<div>
<p> btnOK: TButton; </p>
</div>
<p> private </p>
<div>
<p> FWallacesPrivateVar:
string; // private storage </p>
</div>
<p> public </p>
<div>
<div>
<p> property
WallacesPrivateVar: string read FWallacesPrivateVar write
FWallacesPrivateVar; </p>
</div>
<div>
<div>
<div>
<p> ... </p>
</div>
</div>
</div>
<p> end; </p>
</div>
<div>
<p> </p>
</div>
<p>Cheers<br>
<br>
D<br>
<br>
On 20/01/11 16:09, Conor Boyd wrote: </p>
<div>
<p>Probably as a field on the form class that you're dealing
with. </p>
</div>
<div>
<p> </p>
</div>
<div>
<p>e.g. </p>
</div>
<div>
<p> </p>
</div>
<div>
<p>type </p>
</div>
<div>
<p> TWallaceForm = class(TForm) </p>
</div>
<div>
<p> btnOK: TButton; </p>
</div>
<div>
<p> ... </p>
</div>
<div>
<p> txtWallacesHiddenTextBox:
TEdit; </p>
</div>
<div>
<p> ... </p>
</div>
<div>
<p> private </p>
</div>
<div>
<p> FWallacesPrivateVar:
string; // use this instead of your hidden text box. </p>
</div>
<div>
<p>
// Can create as many "variables" (or fields as they're
known in
Delphi parlance, hence the F prefix) </p>
</div>
<div>
<p>
// of as many different types as you like. </p>
</div>
<div>
<p> ... </p>
</div>
<div>
<p> end; </p>
</div>
<div>
<p> </p>
</div>
<div>
<p>Hope I've understood what you're asking for correctly. </p>
</div>
<div>
<p> </p>
</div>
<div>
<p>HTH, </p>
</div>
<div>
<p> </p>
</div>
<div>
<p>Conor </p>
</div>
<div>
<p> </p>
</div>
<div>
<p><b><span lang="EN-US">From:</span></b><span lang="EN-US"> <a
moz-do-not-send="true"
href="mailto:delphi-bounces@delphi.org.nz">delphi-bounces@delphi.org.nz</a>
[<a moz-do-not-send="true"
href="mailto:delphi-bounces@delphi.org.nz">mailto:delphi-bounces@delphi.org.nz</a>]
<b>On Behalf Of </b>Marshland Engineering<br>
<b>Sent:</b> Thursday, 20 January 2011 3:45 p.m.<br>
<b>To:</b> <a moz-do-not-send="true"
href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a><br>
<b>Subject:</b> [DUG] Variabels stored </span></p>
</div>
<div>
<p>Is there a way to store variables so I can use them
from one procedure to another? </p>
</div>
<div>
<p> </p>
</div>
<div>
<p>I have been currently storing them in hidden edit.text
boxes on the form but there must be a better way. </p>
</div>
<div>
<p> </p>
</div>
<div>
<p>Cheers Wallace </p>
</div>
<pre> </pre>
<pre> </pre>
<pre>_______________________________________________ </pre>
<pre>NZ Borland Developers Group - Delphi mailing list </pre>
<pre>Post: <a moz-do-not-send="true" href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a> </pre>
<pre>Admin: <a moz-do-not-send="true" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a> </pre>
<pre>Unsubscribe: send an email to <a moz-do-not-send="true" href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe </pre>
<p> </p>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a>
Admin: <a class="moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a class="moz-txt-link-abbreviated" href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe</pre>
</blockquote>
<br>
</body>
</html>