Delphi classes_(re)

Wed, 9 Jul 1997 16:44:44 +0200



Peter Gerwinski wrote:

> Well, `CommandEnabled' is
> not a virtual method, and the body of `CommandEnabled' does never refer
> to any data fields of the object.  (So why it's a method then???)

Or rather, why are the relevant variables global (argh!), and not fields
of the correct objects?

> How did Borland solve this problem in BP7?
>
>
>     const
>       T: PView = nil;
>
>     ...
>         P^.Disabled := not T^.CommandEnabled(Command);
>     ...

If I were them, I'd have "improved" the compiler to accept

         "P^.Disabled := not nil^.CommandEnabled(Command);"

in order to save the variable... ;-)

> It's great, isn't it?  Now you see why I do not want to trust Delphi and
> VCL and prefer to hack GPC instead ...

: Gee, I guess that means Delphi was created by a staff of idiots.
: --
:      - Steve Teixeira
:        steixeira@corp.borland.com

Yesterday in c.l.p.b.! NO JOKE! :-)
(Subject: Re: Programming more, sleeping less. How do you stay awake?)
-- 
Frank Heckenbach, Erlangen, Germany
heckenb@mi.uni-erlangen.de
http://www.mi.uni-erlangen.de/~heckenb/links.htm


Frank Heckenbach (heckenb@mi.uni-erlangen.de)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es