<!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.&nbsp; 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&#8217;t see the point in doing that, unless the read/write are
            functions or
            procedures.&nbsp; Just make the string public. </span></p>
        <p><span> &nbsp; </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> &nbsp; </p>
        <p>Or as field properties if you
          want to access them from another form ... </p>
        <div>
          <p>type </p>
        </div>
        <div>
          <p>&nbsp;&nbsp;&nbsp; TWallaceForm = class(TForm) </p>
        </div>
        <div>
          <p>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; btnOK: TButton; </p>
        </div>
        <p>&nbsp;&nbsp;&nbsp; private </p>
        <div>
          <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FWallacesPrivateVar:
            string;&nbsp;&nbsp;&nbsp;&nbsp; // private storage </p>
        </div>
        <p>&nbsp; &nbsp;&nbsp; public </p>
        <div>
          <div>
            <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; property
              WallacesPrivateVar: string read&nbsp; FWallacesPrivateVar write
              FWallacesPrivateVar; </p>
          </div>
          <div>
            <div>
              <div>
                <p>&nbsp; ... </p>
              </div>
            </div>
          </div>
          <p>&nbsp;&nbsp;&nbsp; end; </p>
        </div>
        <div>
          <p> &nbsp; </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>&nbsp; </p>
        </div>
        <div>
          <p>e.g. </p>
        </div>
        <div>
          <p>&nbsp; </p>
        </div>
        <div>
          <p>type </p>
        </div>
        <div>
          <p>&nbsp;&nbsp;&nbsp; TWallaceForm = class(TForm) </p>
        </div>
        <div>
          <p>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; btnOK: TButton; </p>
        </div>
        <div>
          <p>&nbsp;&nbsp;&nbsp; ... </p>
        </div>
        <div>
          <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; txtWallacesHiddenTextBox:
            TEdit; </p>
        </div>
        <div>
          <p>&nbsp;&nbsp;&nbsp;&nbsp;... </p>
        </div>
        <div>
          <p>&nbsp;&nbsp;&nbsp; private </p>
        </div>
        <div>
          <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FWallacesPrivateVar:
            string;&nbsp;&nbsp;&nbsp;&nbsp; // use this instead of your hidden text box. </p>
        </div>
        <div>
          <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            // Can create as many "variables" (or fields as they're
            known in
            Delphi parlance, hence the F prefix) </p>
        </div>
        <div>
          <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            // of as many different types as you like. </p>
        </div>
        <div>
          <p>&nbsp;&nbsp;&nbsp; ... </p>
        </div>
        <div>
          <p>&nbsp;&nbsp;&nbsp; end; </p>
        </div>
        <div>
          <p>&nbsp; </p>
        </div>
        <div>
          <p>Hope I've understood what you're asking for correctly. </p>
        </div>
        <div>
          <p>&nbsp; </p>
        </div>
        <div>
          <p>HTH, </p>
        </div>
        <div>
          <p>&nbsp; </p>
        </div>
        <div>
          <p>Conor </p>
        </div>
        <div>
          <p> &nbsp; </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&nbsp;variables so I can use them
            from one procedure to another? &nbsp; </p>
        </div>
        <div>
          <p>&nbsp; </p>
        </div>
        <div>
          <p>I have been currently storing them in&nbsp;hidden edit.text
            boxes on the form but there must be a better way. </p>
        </div>
        <div>
          <p>&nbsp; </p>
        </div>
        <div>
          <p>Cheers Wallace </p>
        </div>
        <pre> &nbsp; </pre>
        <pre> &nbsp; </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> &nbsp; </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>