On 4/17/07, Jesús Reyes A. <[EMAIL PROTECTED]> wrote:
> In Delphi's TCustomGrid the DrawCell() method is 'virtual abstract',
> but in Lazarus it is virtual.
It's necesary to change it to virtual abstract?, I initially thought that it
could be used for some standard drawing but eventually found it wasn't
necesary.
I wouldn't say it's necessary, it's just different to Delphi's VCL.
Also anybody that created a custom component in Delphi - based on the
TCustomGrid overrides the DrawCell() method and doesn't call
inherited, because they expect the TCustomGrid.DrawCell to be
abstract. I did the same while porting my component, but luckily I
had a peak at the TCustomGrid code and saw it DrawCell has some code,
so called inherited in my component.
I just think that code might get skipped, because developers are not
used to calling inherited in TCustomGrid descendants.
> I'm busy porting a custom component we created that was based on
> TCustomGrid under Delphi 7 & Kylix 3 to Lazarus. As I mentioned the
> DrawCell was abstract under Delphi, but yet it does painting under
> Lazarus.
Calling an abstract method doesn't sound right to me, but maybe it has some
use, can you comment on the usefulness of this?. It's strange that delphi or
Sorry, you miss understood me. I was only pointing out that the VCL
has TCustomGrid.DrawCell defined as abstract and the LCL has it as
virtual. Any developer used to using the VCL and TCustomGrid is not
going to call inherited when they override the DrawCell method.
--
Graeme Geldenhuys
There's no place like S34° 03.168' E018° 49.342'
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives