[fpc-pascal] Re: Inheriting from generics specialized classes

Juha Manninen juha.manninen62 at gmail.com
Thu Nov 24 17:30:11 CET 2011


2011/11/24 Sven Barth <pascaldragon at googlemail.com>

Thanks for the explanations.


In mode Delphi and my generic branch (I hope ^^) you are able to do it like
> this as well:
>
> myV := TMyDerived.Create(False);
> if myV is TFPGObjectList<TMyGen> then
>  ...
>
> Under the condition that "TMyDerived" is declared like in your previous
> mail.
>

I think the syntax you gave should be
 if myV is TFPGObjectList<TControl> then

I will continue learning where to use generics and where not to use them.


Regards,
Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111124/65577c71/attachment.html>


More information about the fpc-pascal mailing list