[Lazarus] new widget implementation - class hierarchy help required

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Jul 8 00:13:54 CEST 2008


2008/7/7 Marc Weustink <marc at dommelstein.net>:
> You register TFpGUIWSWincontrol(TWSWincontrol), then the virtual class
> tree will become
>
> TWSControl - TWSWincontrol - TFpGUIWSWincontrol - TWSButton
>
> So when you derive and register TFpGUIWSButton(TWSButton) it will
> "inherit" from TFpGUIWSWincontrol. The only thing not possible is using
> the "inherited" keyword to call an ancestor method. You can work around
> this by using TWSWincontrolClass(ClassParent).SomeMethod.

Ah, now it makes sense. Some class trickery is at play! :)  Thanks for
explaining it, Marc.


Regards,
 - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the Lazarus mailing list