<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 13 September 2014 20:02, Sven Barth <span dir="ltr"><<a href="mailto:pascaldragon@googlemail.com" target="_blank">pascaldragon@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 13.09.2014 20:13, vfclists . wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
According to the docs the with statement when used with mulltiple<br>
objects only works with the last parameter.<br>
<br>
<br>
The statement<br>
<br>
With A,B,C,D do Statement;<br>
<br>
is equivalent to<br>
<br>
With A do<br>
  With B do<br>
   With C do<br>
    With D do Statement;<br>
<br>
--<br>
<br>
I thought that if all the objects have the property the statement would<br>
apply to them eg.<br>
<br>
<br>
with Label1, Label2, Label3 do<br>
   Caption = 'Text'.<br>
<br>
I thought all the 3 labels would have the caption set, but only Label3's<br>
caption is set. Is this a difference between Delphi's Object Pascal and<br>
FreePascal, or has Delphi's Object Pascal always worked in the same manner?<br>
</blockquote>
<br></span>
It has always worked in this manner. It's just for abbreviating typing, not for combining properties. (and then the with-variant with multiple elements is even more seldomly used than the single-element one...)<br>
<br>
Regards,<br>
Sven<br>
______________________________<u></u>_________________<br>
fpc-pascal maillist  -  <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.<u></u>org</a><br>
<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/<u></u>cgi-bin/mailman/listinfo/fpc-<u></u>pascal</a><br>
</blockquote></div><br>What then is the nesting for if the command will only apply to the last item with the property? Is each nested element supposed to be a property of the enclosing element?</div><div class="gmail_extra"><br></div><div class="gmail_extra">What is the rationale for such a statement, ie using multliple elements?<br clear="all"><div><br></div>-- <br>Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com">http://devblog.brahmancreations.com</a>
</div></div>