[fpc-pascal]Another FPC compiler bug

Johann Glaser Johann.Glaser at gmx.at
Fri Sep 8 20:09:35 CEST 2000


Hi!

I'm just implementing an OOP wrapper for GTK+ in FPC and I found
something, which doesn't look good.

I've got a class "CButton", which has a "Constructor
Create(TheLabel:PGChar);". "CCheckButton", which is a descendant (one
class between) of "CButton", doesn't have this constructor but inherites
it.

When I try to make an instance of "CCheckButton" with that constructor
"TButton := CCheckButton.Create('Display');", the compiler complains
that it wants to have an argument of type "PGtkObject" instead
"ShortString", because there is a "Constructor
Create(CastItem:PGtkObject);" directly in the CCheckButton class.

Shouldn't it be possible to make an instance of a desired class with
calling _any_ constructor, even the inherited?

Bye
  Hansi

-- 
Johann Glaser           <Johann.Glaser at gmx.at>
       Vienna University of Technology
            Electrical Engineering 
http://stud3.tuwien.ac.at/~e9825761/index.html




More information about the fpc-pascal mailing list