Sign in Join

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

Mailing lists / lazarus / 2000-01

no method in an ancestor class

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Bernd Jürgens

Hi folks,

I finally got the compiler to cycle correct. Yippie ! When building lazarus, a complaint about a missing ancestor occurs. What�s wrong ?

make
extctrls.pp(77,6) Error: There is no method in an ancestor class to be
overridden: TPAGE.READSTATE(TREADER)
extctrls.pp(77,6) Warning: An inherited method is hidden by TPAGE.PAINT
extctrls.pp(151,6) Warning: An inherited method is hidden by
TCUSTOMNOTEBOOK.GETCHILDREN
extctrls.pp(151,6) Error: There is no method in an ancestor class to be
overridden: TCUSTOMNOTEBOOK.READSTATE(TREADER)
extctrls.pp(169,6) Warning: An inherited method is hidden by
TCUSTOMNOTEBOOK.GETCHILDREN
extctrls.pp(169,6) Error: There is no method in an ancestor class to be
overridden: TCUSTOMNOTEBOOK.READSTATE(TREADER)
extctrls.pp(301,1) Fatal: There were 3 errors compiling module,
stopping

Reply by email

Bernd Jürgens
to Shane Miller: update your sources once. Go into your Lazarus directory and do an cvs update. Seems…

Hello Shane,

thanks for your reply.

update your sources once. Go into your Lazarus directory and do an cvs update. Seems your extctrls.pp file may be out of date. If that doesn't work, delete that file and do the update to make sure it pulls it.

I deleted the file and did cvs to get a new one. Still the same. I even deleted the whole tree and did a cvs checkout.

Compiler error is:

extctrls.pp(77,6) Error: There is no method in an ancestor class to be overridden: TPAGE.READSTATE(TREADER)

extctrls.pp contains:

  TPage = class(TCustomControl)
  private
    fPageCaption: TLabel;
  protected
    procedure CreateWnd; override;
    procedure ReadState(Reader: TAbstractReader); override;
    procedure Paint;

The hierarchy descends like this:
TPage -> TCustomControl -> TWinControl -> TControl -> TComponent.

In classesinc.h we find the declaration

TComponent = class(TPersistent)
protected
procedure ReadState(Reader: TAbstractReader); virtual;

and it�s built correct:

objdump --syms ../../fcl/linux/classes.o |

grep READSTA
00007a30 g F .text 00000007
_CLASSES$$_$$_TCOMPONENT_$$_READSTATE$TABSTRACTREADER

What�s wrong ?

Bernd Juergens

Reply by email

Shane Miller

update your sources once. Go into your Lazarus directory and do an cvs update. Seems your extctrls.pp file may be out of date. If that doesn't work, delete that file and do the update to make sure it pulls it.

If THAT doesn't work, let us know.
Shane

>> 01/10/00 11:25AM >>>

Hi folks,

I finally got the compiler to cycle correct. Yippie ! When building lazarus, a complaint about a missing ancestor occurs. What s wrong ?

make
extctrls.pp(77,6) Error: There is no method in an ancestor class to be
overridden: TPAGE.READSTATE(TREADER)
extctrls.pp(77,6) Warning: An inherited method is hidden by TPAGE.PAINT
extctrls.pp(151,6) Warning: An inherited method is hidden by
TCUSTOMNOTEBOOK.GETCHILDREN
extctrls.pp(151,6) Error: There is no method in an ancestor class to be
overridden: TCUSTOMNOTEBOOK.READSTATE(TREADER)
extctrls.pp(169,6) Warning: An inherited method is hidden by
TCUSTOMNOTEBOOK.GETCHILDREN
extctrls.pp(169,6) Error: There is no method in an ancestor class to be
overridden: TCUSTOMNOTEBOOK.READSTATE(TREADER)
extctrls.pp(301,1) Fatal: There were 3 errors compiling module,
stopping

_________________________________________________________________ To unsubscribe: mail with
"unsubscribe" as the Subject
archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Stefan Hille
to Bernd Jürgens: I finally got the compiler to cycle correct. Yippie ! When building lazarus, a complaint…

Hi!

Bernd J�rgens wrote 13 lines
Hi folks, I finally got the compiler to cycle correct. Yippie ! When building lazarus, a complaint about a missing ancestor occurs. What�s wrong ? > make extctrls.pp(77,6) Error: There is no method in an ancestor class to be overridden: TPAGE.READSTATE(TREADER) [...]

These errors occur because of a restructuring in the fcl which is not yet reflected in lazarus. To overcome this remove the line

  TAbstractReader = TReader;

from extctrls.pp.

bye,

Stefan
-
--------------------------------------------------------- Stefan Hille email:
48155 Muenster voice: 0251/664695

Reply by email