AW: [lazarus] Object Inspector

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Nov 16 19:49:20 EST 2000


>[FormDesigner]
>(Shane created a website for this, maybe you can take a look at it).

Where is this page?

>- What are your thoughts concerning the relation between the FormDesigner and
>  ObjectInspector? I'm not sure if they cane be developed independent of each
>  other (at least the interface should be clear).

The ObjectInspector reads and writes the selected component list of the
FormDesigner. The rest is up to the various PropertyEditors. 90% of the
PropertyEditors do not need more.

> From my point of view the interface between the inspector and the editor
> should consist of only a few functions. These are the things that come to
> my mind:

>    procedure AddComponent (aFormName, aObjectName);
>    procedure DeleteComponent (aFormName, aObjectName);
>    procedure RenameComponent (aFormName, oldObjectName, newObjectName);

>    procedure AddCallback (aFormName, aMethodName);
>        // the editor should implement "AddCallback" as a sequence of
>	//    - search for "aMethodName"
>	//    - create "aMethodName" if not yet present
>	//    - position cursor at implementation of "aMethodName"

>    procedure AddCallback (aFormName, aMethodName);
>    procedure DeleteCallback (aFormName, aMethodName);                    //
???
>    procedure RenameCallback (aFormName, oldMethodName, newMethodName);   //
???

I agree, that we don't need the complete FormDesigner of Delphi. But I think
there is missing an important point: the selected component list. Both, the OI
and the FD must maintain a list of selected components.
For example:

  property Selections:TSelectedComponentList;  // = TDesignerSelections in
Delphi

Every time the SetSelections procedure is invoked, it compares the new with
the old one and if different updates itself.

The MethodPropertyEditor and the ComponentPropertyEditor also need a list of
compatible methods/properties (for the combobox), thus the FD needs:

  procedure FormDesigner.GetMethods(TypeData: PTypeData; Proc: TGetStrProc);
  procedure FormDesigner.GetComponents(TypeData: PTypeData; Proc:
TGetStrProc);


bye,
Mattias








More information about the Lazarus mailing list