----- Original Message ----- From: "Graeme Geldenhuys" <[EMAIL PROTECTED]>
To: <lazarus@miraclec.com>
Sent: Tuesday, April 17, 2007 1:22 AM
Subject: Re: [lazarus] TCustomGrid not the same as Delphi


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.

That's what I thought.

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.


Oh, I assumed to much, because you said that you was porting a component I thought that your component already included an inherited call. As delphi allows it I thought that was currently the case. I'm sorry for the confusion.


--
Graeme Geldenhuys

There's no place like S34° 03.168'  E018° 49.342'


Jesus Reyes A.

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! Regístrate ya - http://correo.yahoo.com.mx/
_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to