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?)