On Thu, Nov 6, 2008 at 23:48, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote:

> And a perfect example of why I DON'T user the 'with' statement!  Hard
> to read, hard to understand and hard to debug (tooltip expressions
> cannot evaluate it even in Delphi v7 at least).  :)

Proposed change can potentially fix all the issues, including debuggability
(since the object will be named, and thus accessible to debugger).

> The only time you will ever see me use the WITH statement
> is in auto generate UI code as shown below:
>
>  cbType := TfpgComboBox.Create(self);
>  with cbType do
>  begin
>    Name := 'cbType';
>    SetPosition(8, 24, 272, 22);
>    FontDesc := '#List';
>  end;

So when you write such code by hand, you do not use 'with' ?
Anyway, this is all just my opinion, and not too strong at that ;-)

-- 
Alexander S. Klenin
Insight Experts Ltd.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to