[Lazarus] ComponentEditors.pas: editor form procedures should work with TForm
Mattias Gaertner
nc-gaertnma at netcologne.de
Fri Oct 8 19:41:38 CEST 2010
On Fri, 8 Oct 2010 10:35:17 -0700 (PDT)
Jesus Reyes <jesusrmx at yahoo.com.mx> wrote:
>[...]
> It was made the way it is by considering at least three things, one, most times there will be a type cast to the new TForm class is being used to create an instance and the component or property editor is well aware of the right class to be used, two, FindEditorForm allows access to other component or property editors forms, and the more isolated are they the better.
>
> At the same time it opens the door to other kinds of 'form' editors which are not descendants of forms. Btw, what if somebody uses TCustomForm as parent class instead of TForm?, So the way was planned accounted also flexibility.
Since 0.9.27 a designer form can be anything descending from TComponent.
That means, in FindEditorForm TObject can be changed to TComponent,
although that does not raise much type safety.
Mattias
More information about the Lazarus
mailing list