[lazarus] Interface Initialization
Vincent Snijders
vslist at zonnet.nl
Sat Nov 23 16:30:24 EST 2002
I have seen that constructor and destructor of the gtk-interface objects are
not quite balanced. There is also a lot of clean up which IMO belongs to the
AppTerminate method.
Wouldn't it be better to create and initialize the interface object in the
application.Initialize and To destroy it in the Application.Terminate? Then
moving between Create doesn't matter anymore.
The interfaces unit must then set a class for the interface, like:
type
LCLWidgetInterface = class of InterfaceBase;
initialize
LCLWidgetInterface = TGTKObject;
In the Application.Initialize code like this could be used:
InterfaceObject := LCLWidgetClass.Create;
Vincent Snijders.
More information about the Lazarus
mailing list