[lazarus] Object Inspector

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


I have the AddComponent function created in the abstract class already.  It's called CreateComponent.  I don't have a DeleteComponent or Rename component.  Here was my plan for this:

Delete:  You select a control and you get the TComponentInterface returned to you.  You call it's delete and it's removed.  This would triiger something (????) and the TFormEditor would tell the Editor to remove the references to that control.......

Rename:  You select the control and Then in Object Inspector you change it's NAME property.  The TComponentInterface function SetPropertybyName('NAme') is called.  This causes an event and the TFormEditor tells the code editor to change the references of Oldname to Newname.....


Thoughts?  I'd appreciate help on the "What happens to cause the update of the code" stuff.

Shane


>>> stoppok at osibisa.ms.sub.org 11/16/00 03:57PM >>>
Hi!

On Wed, Nov 15, 2000 at 09:07:39PM +0100, Mattias Gaertner wrote:
> [.. ObjectInspector ..]

I totally agree on you points 1..4. The Delphi concept is really good.

> 5.
> Methods:
> Hmm, this is quite complex. Delphis form source code is maintained by a
> FormDesigner which handles the creation, renaming, searching and deletion of
> variables and methods in the code. I think, we will need such a thing too.

Some time ago we had a discussion on the developers list which may help
here: We decided to go for an abstract approch where the different
components of the ide are quite independant of each other. Sorry to say
that not much work has yet been done (Shane created a website for this,
maybe you can take a look at it).
 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);   // ???
    
> Did I miss something important?

- 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).

- About a year ago their was some discussion about an already existing form-
  designer which could fit into lazarus. I don't know if it also contains an
  obectinspector but it could be worth a look. If I remember it right, the
  author is Samuel Liddicott (<sam at campbellsci.co.uk>). Don't know if he's still
  reading this list.

> Or is someone out there who dislikes some behaviour of delphis object
> inspector and has much better ideas?

Don't dislike anything. I'm really glad that you're pushing things.

bye,

  Stefan
-- 
---------------------------------------------------------
Stefan Hille          email: stoppok at osibisa.ms.sub.org 
48155 Muenster	      voice: 0251/664695 

_________________________________________________________________
     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