Sign in Join

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

Mailing lists / lazarus / 2010-08

Strange problem with frames

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

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

Дмитрий Курашкин

Hi to all!

Sorry for poor english, I'll try to explain my problem.

I found strange problem with frames.
I started refactoring of my project. It has many forms, each form has many sections. I decided to make some frames with similar functions.

Now project has following classes:

Class TBaseFrame: child of TFrame, it has data controls (TZQuery from ZEOS components), DrawGrid and two buttons (TButton) - "Add" and "Edit".

Class TExtendedFrame: child of TBaseFrame, it has two additional buttons - SaveButton and CancelButton.

Class TFileSetFrame: child of TExtendedFrame, it has button OpenFile.

Problems appears when I add TFileSetFrame to form in my project. I see following message in runtime (exception raises in form constructor):

"Ancestor class for "SaveButton" not found".

If I add TExtendedFrame to form, all works fine. But now I need three levels of inheritance: some my frames uses only TBaseFrame functions, some frames must be inherited from TExtendedFrame.

How to force it to work?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100820/ca239e08/attachment.html>