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

2011-11-24 Thread Sven Barth
Am 24.11.2011 17:30, schrieb Juha Manninen: 2011/11/24 Sven Barth mailto:pascaldra...@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 TFPGObjectLi

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

2011-11-24 Thread Juha Manninen
2011/11/24 Sven Barth 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 then > ... > > Under the condition that "TMyDerived" is declared like in your previous

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

2011-11-24 Thread Sven Barth
Am 24.11.2011 17:10, schrieb Juha Manninen: Now, if I do: myV := TMyDerived.Create(False); if myV is TFPGObjectList then ... it gives: unit1.pas(67,10) Error: Class or Object types "TMyDerived" and "TFPGObjectList" are not related In my opinion they are related. Maybe generics ar

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

2011-11-24 Thread Juha Manninen
Now, if I do: myV := TMyDerived.Create(False); if myV is TFPGObjectList then ... it gives: unit1.pas(67,10) Error: Class or Object types "TMyDerived" and "TFPGObjectList" are not related In my opinion they are related. Maybe generics are good only for situations where you don't need to