Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2000-09

Another FPC compiler bug

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Johann Glaser

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 Vienna University of Technology Electrical Engineering http://stud3.tuwien.ac.at/~e9825761/index.html

Reply by email