AW: [lazarus] Object Inspector

Shane Miller SMiller1 at stvgb.org
Sat Nov 18 19:23:43 EST 2000


I still have the page up and running but I'm not sure how helpful it would be.  No one really ever filled anything out.  Instead I am starting to write them and placing the abstract files in the designer directory.

Can you explain to me what the functions.....

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

are passed and what's returned from them.

If you explain what you want I will add them to the TCustomFormEditor code....
Is that where you want them in the FormEditor?  The FormEditor class is the class that controls the FORM and keeps a list of selected controsl on that form.  It will return a TComponentInterface to you for each control on the form.  The TComponentInterface can Set/Get property values (by name and index), return the component type, return an TComponentInterface for it's parent, Focus the control,  Delete the control, Selects the control (and tells the object inspector), etc.

How's that all sound?
Shane


>>> nc-gaertnma at netcologne.de 11/16/00 06:49PM >>>
>[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



_________________________________________________________________
     To unsubscribe: mail lazarus-request at miraclec.com with
                "unsubscribe" as the Subject
    archives at http://www.miraclec.com/list_archives/lazarus






More information about the Lazarus mailing list