Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2000-11

Object Inspector Grid

35 messages · 11 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jens Schiffler
to Mattias Gaertner: The PropertyEditors will draw themselves. Therefore I'm searching for a grid or a listbox…
Mattias Gaertner wrote 6 lines
The PropertyEditors will draw themselves. Therefore I'm searching for a grid or a listbox with something like an OnDrawCell or OnDrawItem event. But I didn't found such events. Are there any components completed in the lcl which come close to a customizable listbox?

I've written a Sibyl-Component ("AbstractSuperGrid) that could be used as abstract base class for that purpose.
The code should be available on sibylarchive.hypermart.net/components.

Jens

Reply by email

Shane Miller

OK, I started working on the FormEditor stuff but I hit a wall and I know it's something stupid so instead of looking at it for another hour I figured I would ask.

I committed my source to CVS so feel free to pull it.

In the lazrus/designer/abstractformeditor file I have functions in TAbstractFormEditor like

Function Filename : Stirng; virtual; abstract;

Then in TCustomFormEditor I declare a function

Function Filename : String; override;

but when I compile it tells me....

Overloaded methods which are virtual must have the same return type: TCUSTOMFORMEDITOR.FILENAME.

NO What's the deal?

Shane

>> 11/17/00 02:55PM >>>
Shane Miller wrote 6 lines
I don't think we have any controls that fill your needs at this time. I remember there was a GTK grid component created that we were thinking of using. Does anyone remember the site for that?

I'm not positive but it might have been gtkSheet.

http://magnet.fsu.edu/~feiguin/gtk/

==== Programming my first best destiny! ==== Michael A. Hess Miracle Concepts, Inc. http://www.miraclec.com _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Stefan Hille
to Shane Miller: I don't believe ANYTHING has really been done on it. I know that someone was looking…

Hi!

Mattias Gaertner wrote
[.. ObjectInspector ..]

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

Show quoted text 5 lines
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 (). 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: 48155 Muenster voice: 0251/664695

Reply by email

Shane Miller

I don't believe ANYTHING has really been done on it. I know that someone was looking into it but that was quite a time ago.

Are you interested in looking at it? If so, we would love to help you in anyway possible. If you are going to look at it please meail me and I will help you.

Shane

>> 11/15/00 07:24AM >>>

Hi all,

who is working on the object inspector for lazarus, what has been done and what is left to do?

Mattias

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

Reply by email

Mattias Gaertner
to Stefan Hille: Hi! I totally agree on you points 1..4. The Delphi concept is really good. Some time ago…
[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.

Show quoted text 16 lines
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

Reply by email

Marco van de Voort
to Shane Miller: OK, I started working on the FormEditor stuff but I hit a wall and I know it's something…
In the lazrus/designer/abstractformeditor file I have functions in TAbstractFormEditor like Function Filename : Stirng; virtual; abstract;

I assume this is a typo :-)

Show quoted text 5 lines
Then in TCustomFormEditor I declare a function Function Filename : String; override; but when I compile it tells me....

Some problem with {$H+} maybe? Do you compile some in Delphi, and some in ObjPas mode?

Overloaded methods which are virtual must have the same return type: TCUSTOMFORMEDITOR.FILENAME. NO What's the deal?

Something with the string=ansistring or string=shortstring probably.

1. Try adding {$H+}
2. Try including sysutils in the uses clause
3. Compile the entire project forced in one mode {-Sd or -S2) Use make OPT='-Sd' or Make OPT='-S2'.
4. Check for {$MODE statements in the related sources, and make sure they match.

Reply by email

Shane Miller

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

>> 11/16/00 03:57PM >>>

Hi!

Mattias Gaertner wrote
[.. ObjectInspector ..]

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

Show quoted text 5 lines
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 (). 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: 48155 Muenster voice: 0251/664695 _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Michael A. Hess
to Shane Miller: I don't believe ANYTHING has really been done on it. I know that someone was looking…
Stefan Hille wrote 7 lines
- 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 (). Don't know if he's still reading this list.

I'm not sure what happened to Sam. At one point he announced that he was moving and would be leaving the list but would return in a few weeks. He has never come back.

The Form Designer he had written was FEdit. There is a link to the source on the ftp site.

ftp://lazarus.freepascal.org/lazarus/fedit3.zip

At the time he indicated that he had permission for us to use the code and he had a signed document giving us the rights to the code. However he never passed that document on to any of us and he hasn't come back to the list so I am not sure if we can use it or not. That isn't to say we could get some ideas from the code we just couldn't use the code out right.

The other possiblity is to build on Handel. I believe that when some others looked at the possibility of using it that it was too linked to the Windows API to use directly. Again however it is open source and can be used in whole or part as we see fit. The demo version of Handel is on the site.

ftp://lazarus.freepascal.org/lazarus/handel.zip

as well as the source for the tool.

ftp://lazarus.freepascal.org/lazarus.handel_source.zip

For those not familiar with Handel this is a replica of the complete Delphi 3 IDE written using Delphi 3.

==== Programming my first best destiny! ==== Michael A. Hess Miracle Concepts, Inc. http://www.miraclec.com

Reply by email

Mattias Gaertner
to Shane Miller: In addition to your #1 Each line that a property exist on is created by a grid (?)…
In addition to your #1 Each line that a property exist on is created by a grid (?) control. So, it's a tabsheet with a TGrid control on it. (TStringGrid?)

The PropertyEditors will draw themselves.
Therefore I'm searching for a grid or a listbox with something like an OnDrawCell or OnDrawItem event.
But I didn't found such events.
Are there any components completed in the lcl which come close to a customizable listbox?

Mattias

Reply by email

Pellegrin,Emmanuel

I'm Sorry To ask You Again About
An Error When I Ran lazarus after Compilling:

D:\pp\source\Lazarus>lazarus
LM_SCREENINIT called --> should go to GTKObject.Init TODO: check this
An unhandled exception occurred at 0x000E2888 :
Access violation
0x000E2888
0x0044EE37
0x00459FC3
0x00468129

I'm On NT ,Sp6,I586 , Gtk dll's ver 1.3

Is There a Solution Found Or I Have to Find MySelf ?? Thanks.....

Reply by email

Shane Miller

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

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

Show quoted text 16 lines
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 with
"unsubscribe" as the Subject
archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Shane Miller

In addition to your #1 Each line that a property exist on is created by a grid (?) control. So, it's a tabsheet with a TGrid control on it. (TStringGrid?)

#5. I agree that the formdesigner should handle this. When you click on an event (like OnClick) you would add the text <controlname>OnClick and send this information to the formdesigner in some way. The formdesigner would search for this function. If it did not exist it would create it.

We can leave some methods open for the object inspector to call in the form designer for this purpose.

Is this a good method of doing this? If so, we'll need to come up with the method names, etc and I'll add them to a TFormDesigner class definition.

Shane

Show quoted text 7 lines
>> 11/15/00 01:51PM >>> I don't believe ANYTHING has really been done on it. Are you interested in looking at it? If so, we would love to help you in anyway possible. If you are going to look at it please meail me and I will help you. Shane

Ok, I will do it.
But first I want to discuss the basic concept.

1.
The object inspector is a single form (descendent of TForm), a combobox at the top filled with the components of the current form, a PageControl with two TabSheets (properties and events) and a StatusBar.
Each TabSheet contains a list of properties of the selected component(s). These properties are the "registered" published properties. Registered means: a valid PropertyEditor exists.

2.
The property editors will be very similar to the delphi ones (see toolsapi\dsgnintf.pas).

3.
Each property in the TabSheets is shown as a pair of name and value. Subproperties (sets and classes) are shown as a tree like structure. Editing is possible by
-a TEdit for simple types (e.g. Left, Width)
-a ComboBox for types with value lists (e.g. Color, Cursor) -a dialog which is activated by the ellipse button or double click (e.g. Items)

4.
If more then one component is selected only the intersection of all multi-selectable properties are shown.

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.

Did I miss something important?
Or is someone out there who dislikes some behaviour of delphis object inspector and has much better ideas?

Mattias

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

Reply by email

Shane Miller

I don't think we have any controls that fill your needs at this time. I remember there was a GTK grid component created that we were thinking of using.
Does anyone remember the site for that? You could use that control and simply add the calls to it in the LCL.

Shane

Earlier message 27 lines
-----Original Message----- From: Mattias Gaertner To: Date: Friday, November 17, 2000 8:45 AM Subject: [lazarus] Object Inspector Grid >>In addition to your #1 Each line that a property >>exist on is created by a grid (?) control. >>So, it's a tabsheet with a TGrid >>control on it. (TStringGrid?) > >The PropertyEditors will draw themselves. >Therefore I'm searching for a grid or a listbox with something like an >OnDrawCell or OnDrawItem event. >But I didn't found such events. >Are there any components completed in the lcl which come close to a >customizable listbox? > > >Mattias > >_________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus >

Reply by email

Shane Miller

I don't remember what the solution was for this but I know it's been asked within the last month and I thought a solution was found.

Take a look at the archives if you don't get an answer here. Shane

Earlier message 33 lines
-----Original Message----- From: Pellegrin,Emmanuel To: '' Date: Friday, November 17, 2000 9:03 AM Subject: RE: [lazarus] Object Inspector Grid >I'm Sorry To ask You Again About >An Error When I Ran lazarus after Compilling: > > > >D:\pp\source\Lazarus>lazarus >LM_SCREENINIT called --> should go to GTKObject.Init >TODO: check this >An unhandled exception occurred at 0x000E2888 : >Access violation > 0x000E2888 > 0x0044EE37 > 0x00459FC3 > 0x00468129 > > >I'm On NT ,Sp6,I586 , Gtk dll's ver 1.3 > >Is There a Solution Found Or I Have to Find MySelf ?? >Thanks..... > >_________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus >

Reply by email

Mattias Gaertner
to Shane Miller: One thing first. I am calling it FormEditor. IS that OK? Everyone is referring to it…
Show quoted text 7 lines
Second: I was thinking that the Set/Get methods for the TComponentInterface would be used by the Object Inspector and the FormEditor. When someone changed something in the OI they could then call the Set method for the TICOmponentInterface and it would change it. Otherwise how does the FormEditor know what changed?

Delphis FormDesigner don't know what has changed and still works. All values are read just in time via RTTI.
There is a reason for this:
If a property is changed, some other properties can change too. How will the TComponentInterface ever know, if not by reading all from the RTTI? What value changes the FormEditor needs to know?

Where would the OI store what was changed? It would need to set the new value to the property wouldn't it?

It "stores" the values simply via the RTTI. For integer values this is a simple SetOrdValue. In fact, it changes the real value of the running form.

Mattias

Reply by email

Mattias Gaertner
to Shane Miller: I still have the page up and running but I'm not sure how helpful it would be. No one…
Show quoted text 5 lines
Can you explain to me what the functions..... procedure FormDesigner.GetMethods(TypeData: PTypeData; Proc: TGetStrProc); procedure FormDesigner.GetComponents(TypeData: PTypeData; Proc: TGetStrProc);

This is my idea:
GetMethods is used, when the combobox of a Method-Property is filled with all valid Method names.
GetComponents is used, when the comboboc of a Component-Property is filled with all valid Property names.

  TypeData:
    PTypeData is defined in TypeInfo and describes the method/component type.
  Proc:
    TGetStrProc = procedure(const S: string) of object;
    Proc: TGetStrProc is for example the Add procedure of a TStrings instance.

To implement the two functions you must compare every (published) property of the form with the TypeData. I'm not yet an expert in RTTI, so I don't know, if there already exists a function that can say if two types are compatible.

Show quoted text 9 lines
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?

That sounds, as if lazarus is getting better. :)

(Florian Klaempfl has mentioned it):
The components can be remote controlled by the RTTI. Every Control on the form is owned by the form itself and can be found via the form.Components property. The Property Editors read and write values with the RTTI. So, I think, we don't need the Set/Get property in the TComponentInterface. As far as I can see, the OI needs in the form designer only select, unselect, delete and add procedures and a RootComponent and Modified property.

If the user changes some values on the form designer itself (e.g. moving, resizing a component) the form designer executes the UpdatePropertyValues in the Object Inspector, and the OI will show all changed values. If the selection changes in the formdesigner, the formdesigner sets the "property Selections:TSelectedComponentList;" in the Object Inspector: ObjInspec.Selections:=FormDesigner.Selections;
Then the OI will destroy its old list, sets the new list, builds the intersection of all selected components and shows the properties.

The TSelectedComponentList is a simple pointer list:

  TSelectedComponentList = class
  private
    FComponents:TList;
    function GetItems(Index: integer): TComponent;
    procedure SetItems(Index: integer; const Value: TComponent);
    function GetCount: integer;
  public
    procedure Clear;
    property Count:integer read GetCount;
    function Add(c:TComponent):integer;
    procedure Delete(Index:integer);
    property Items[Index:integer]:TComponent read GetItems write SetItems;
default;
    constructor Create;
    destructor Destroy;  override;
  end;

There is yet another point. The formdesigner should have an Modified property, that the ObjectInspector sets if something has changed. Thus, the formdesigner knows, if the lfm file must be stored.

These are only my personal ideas. I think, they are very similar to Delphi. But is Delphi always the best?

What do you think?

Mattias

Reply by email

Mattias Gaertner
to Shane Miller: I don't believe ANYTHING has really been done on it. I know that someone was looking…
Show quoted text 6 lines
I don't believe ANYTHING has really been done on it. Are you interested in looking at it? If so, we would love to help you in anyway possible. If you are going to look at it please meail me and I will help you. Shane

Ok, I will do it.
But first I want to discuss the basic concept.

1.
The object inspector is a single form (descendent of TForm), a combobox at the top filled with the components of the current form, a PageControl with two TabSheets (properties and events) and a StatusBar.
Each TabSheet contains a list of properties of the selected component(s). These properties are the "registered" published properties. Registered means: a valid PropertyEditor exists.

2.
The property editors will be very similar to the delphi ones (see toolsapi\dsgnintf.pas).

3.
Each property in the TabSheets is shown as a pair of name and value. Subproperties (sets and classes) are shown as a tree like structure. Editing is possible by
-a TEdit for simple types (e.g. Left, Width)
-a ComboBox for types with value lists (e.g. Color, Cursor) -a dialog which is activated by the ellipse button or double click (e.g. Items)

4.
If more then one component is selected only the intersection of all multi-selectable properties are shown.

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.

Did I miss something important?
Or is someone out there who dislikes some behaviour of delphis object inspector and has much better ideas?

Mattias

Reply by email

Michael A. Hess
to Shane Miller: I don't think we have any controls that fill your needs at this time. I remember there…
Shane Miller wrote 6 lines
I don't think we have any controls that fill your needs at this time. I remember there was a GTK grid component created that we were thinking of using. Does anyone remember the site for that?

I'm not positive but it might have been gtkSheet.

http://magnet.fsu.edu/~feiguin/gtk/

==== Programming my first best destiny! ==== Michael A. Hess Miracle Concepts, Inc. http://www.miraclec.com

Reply by email

Chris
to Shane Miller: I don't believe ANYTHING has really been done on it. I know that someone was looking…

Take a look at the delphi super page for insp30 which is a well written inspector written for delphi3. I'm using it in delphi5 with no changes, and the author is willing to license it under any (reasonable) open source license. I've tried handle, and it has some parts of the insp30 in it. But the editing isn't as good. Insp30 feels right like delphi.

Earlier message 57 lines
----- Original Message ----- From: "Michael A. Hess" To: Sent: Friday, November 17, 2000 2:18 AM Subject: Re: [lazarus] Object Inspector > Stefan Hille wrote: > > > > - 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 > > (). Don't know if he's still reading this > > list. > > I'm not sure what happened to Sam. At one point he announced that he was > moving and would be leaving the list but would return in a few weeks. He > has never come back. > > The Form Designer he had written was FEdit. There is a link to the > source on the ftp site. > > ftp://lazarus.freepascal.org/lazarus/fedit3.zip > > At the time he indicated that he had permission for us to use the code > and he had a signed document giving us the rights to the code. However > he never passed that document on to any of us and he hasn't come back to > the list so I am not sure if we can use it or not. That isn't to say we > could get some ideas from the code we just couldn't use the code out > right. > > The other possiblity is to build on Handel. I believe that when some > others looked at the possibility of using it that it was too linked to > the Windows API to use directly. Again however it is open source and can > be used in whole or part as we see fit. The demo version of Handel is on > the site. > > ftp://lazarus.freepascal.org/lazarus/handel.zip > > as well as the source for the tool. > > ftp://lazarus.freepascal.org/lazarus.handel_source.zip > > For those not familiar with Handel this is a replica of the complete > Delphi 3 IDE written using Delphi 3. > > -- > ==== Programming my first best destiny! ==== > > Michael A. Hess Miracle Concepts, Inc. > http://www.miraclec.com > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Shane Miller

One thing first. I am calling it FormEditor. IS that OK? Everyone is referring to it as FormDesigner....

Second: I was thinking that the Set/Get methods for the TComponentInterface would be used by the Object Inspector and the FormEditor.

When someone changed something in the OI they could then call the Set method for the TICOmponentInterface and it would change it. Otherwise how does the FormEditor know what changed? Where would the OI store what was changed? It would need to set the new value to the property wouldn't it?

Shane

Show quoted text 6 lines
>> 11/20/00 04:53AM >>> Can you explain to me what the functions..... procedure FormDesigner.GetMethods(TypeData: PTypeData; Proc: TGetStrProc); procedure FormDesigner.GetComponents(TypeData: PTypeData; Proc: TGetStrProc);

This is my idea:
GetMethods is used, when the combobox of a Method-Property is filled with all valid Method names.
GetComponents is used, when the comboboc of a Component-Property is filled with all valid Property names.

  TypeData:
    PTypeData is defined in TypeInfo and describes the method/component type.
  Proc:
    TGetStrProc = procedure(const S: string) of object;
    Proc: TGetStrProc is for example the Add procedure of a TStrings instance.

To implement the two functions you must compare every (published) property of the form with the TypeData. I'm not yet an expert in RTTI, so I don't know, if there already exists a function that can say if two types are compatible.

Show quoted text 9 lines
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?

That sounds, as if lazarus is getting better. :)

(Florian Klaempfl has mentioned it):
The components can be remote controlled by the RTTI. Every Control on the form is owned by the form itself and can be found via the form.Components property. The Property Editors read and write values with the RTTI. So, I think, we don't need the Set/Get property in the TComponentInterface. As far as I can see, the OI needs in the form designer only select, unselect, delete and add procedures and a RootComponent and Modified property.

If the user changes some values on the form designer itself (e.g. moving, resizing a component) the form designer executes the UpdatePropertyValues in the Object Inspector, and the OI will show all changed values. If the selection changes in the formdesigner, the formdesigner sets the "property Selections:TSelectedComponentList;" in the Object Inspector: ObjInspec.Selections:=FormDesigner.Selections;
Then the OI will destroy its old list, sets the new list, builds the intersection of all selected components and shows the properties.

The TSelectedComponentList is a simple pointer list:

  TSelectedComponentList = class
  private
    FComponents:TList;
    function GetItems(Index: integer): TComponent;
    procedure SetItems(Index: integer; const Value: TComponent);
    function GetCount: integer;
  public
    procedure Clear;
    property Count:integer read GetCount;
    function Add(c:TComponent):integer;
    procedure Delete(Index:integer);
    property Items[Index:integer]:TComponent read GetItems write SetItems;
default;
    constructor Create;
    destructor Destroy;  override;
  end;

There is yet another point. The formdesigner should have an Modified property, that the ObjectInspector sets if something has changed. Thus, the formdesigner knows, if the lfm file must be stored.

These are only my personal ideas. I think, they are very similar to Delphi. But is Delphi always the best?

What do you think?

Mattias

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

Reply by email

Shane Miller

CVS Updated.
I changed the code so you can now drop controls onto the form again and they are now displayed in the Object Inspector.

One problem I am having: In TCustomFormEditor's CreateComponent I am figuring out a name for the new control but it seems to be causing a problem. It determines the right name but in the object inspector it's not displayed right if you select something else and re-select the control.

Any idea's?

Shane

>> 11/27/00 01:18PM >>>

BTW, dropping controls on the form kills everything. I'm not sure exactly why yet but I'm working on it....

Shane

>> 11/27/00 12:59PM >>>

CVS has been updated with an early version of the object inspector (thanks to Mattias).

If you compile Lazarus you can run it and you'll see the Object Inspector. If you Click on File- New- Form a form appears and you can see the Object Inspector will show you the properties of the form. Not many of them can be changed yet through the OI but hopefully soon.....

Another step in the right direction.........

Shane

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

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

Reply by email

Shane Miller

Can you give me a general description of the classes you plan on using and their layout. I am createing a page for these so we can better discuss them. Put it in a text file and attach it.

thanks
Shane

Show quoted text 8 lines
>> 11/20/00 12:13PM >>> Second: I was thinking that the Set/Get methods for the TComponentInterface would be used by the Object Inspector and the FormEditor. When someone changed something in the OI they could then call the Set method for the TICOmponentInterface and it would change it. Otherwise how does the FormEditor know what changed?

Delphis FormDesigner don't know what has changed and still works. All values are read just in time via RTTI.
There is a reason for this:
If a property is changed, some other properties can change too. How will the TComponentInterface ever know, if not by reading all from the RTTI? What value changes the FormEditor needs to know?

Where would the OI store what was changed? It would need to set the new value to the property wouldn't it?

It "stores" the values simply via the RTTI. For integer values this is a simple SetOrdValue. In fact, it changes the real value of the running form.

Mattias

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

Reply by email

Shane Miller

You pulled the latest version and compiled it but you don't see the Object Inspector?

Shane

>> 11/28/00 08:35AM >>>

Lamentably these wonders are not seen under Windows and under Linux it is not wanted to let compile.

Luis Digital
http://www.luisdigital.2y.net

Earlier message 61 lines
----- Original Message ----- From: Shane Miller To: Sent: Monday, November 27, 2000 4:38 PM Subject: Re: [lazarus] Object Inspector > CVS Updated. > I changed the code so you can now drop controls onto the form again and they are now displayed in the Object Inspector. > > One problem I am having: In TCustomFormEditor's CreateComponent I am figuring out a name for the new control but it seems to be causing a problem. It determines the right name but in the object inspector it's not displayed right if you select something else and re-select the control. > > Any idea's? > > Shane > > > >>> 11/27/00 01:18PM >>> > BTW, dropping controls on the form kills everything. I'm not sure exactly why yet but I'm working on it.... > > Shane > > > >>> 11/27/00 12:59PM >>> > CVS has been updated with an early version of the object inspector (thanks to Mattias). > > If you compile Lazarus you can run it and you'll see the Object Inspector. If you Click on File- New- Form a form appears and you can see the Object Inspector will show you the properties of the form. Not many of them can be changed yet through the OI but hopefully soon..... > > Another step in the right direction......... > > Shane > > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Luis R. Hilario B.
to Shane Miller: CVS Updated. I changed the code so you can now drop controls onto the form again and they…

Lamentably these wonders are not seen under Windows and under Linux it is not wanted to let compile.

Luis Digital
http://www.luisdigital.2y.net

Earlier message 56 lines
----- Original Message ----- From: Shane Miller To: Sent: Monday, November 27, 2000 4:38 PM Subject: Re: [lazarus] Object Inspector > CVS Updated. > I changed the code so you can now drop controls onto the form again and they are now displayed in the Object Inspector. > > One problem I am having: In TCustomFormEditor's CreateComponent I am figuring out a name for the new control but it seems to be causing a problem. It determines the right name but in the object inspector it's not displayed right if you select something else and re-select the control. > > Any idea's? > > Shane > > > >>> 11/27/00 01:18PM >>> > BTW, dropping controls on the form kills everything. I'm not sure exactly why yet but I'm working on it.... > > Shane > > > >>> 11/27/00 12:59PM >>> > CVS has been updated with an early version of the object inspector (thanks to Mattias). > > If you compile Lazarus you can run it and you'll see the Object Inspector. If you Click on File- New- Form a form appears and you can see the Object Inspector will show you the properties of the form. Not many of them can be changed yet through the OI but hopefully soon..... > > Another step in the right direction......... > > Shane > > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Luis R. Hilario B.
to Shane Miller: You pulled the latest version and compiled it but you don't see the Object Inspector?…

----- Original Message -----

Earlier message 21 lines
From: Shane Miller To: Sent: Tuesday, November 28, 2000 12:00 PM Subject: RE: [lazarus] Object Inspector > You pulled the latest version and compiled it but you don't see the Object Inspector? Yes, I see the Object Inspector, but within the form does not appear nothing. It is really a general problem that has Lazarus under Windows. Is GTK the problem? Under Linux it does not compile for the reasons already exposed. The error happens with the units GTK, Forms, etc. http://www.freepascal.org/bugs/showrec.php3?ID=1164 Some idea? Luis Digital http://www.luisdigital.2y.net

Reply by email

Shane Miller

I re-did the dropping of controls so I could get the object inspector working. The grabbers should be able to be added quickly again but I just didn't get to it. I'm not real sure how the dropping of controls should be implemented in the first place.

Now that we have someone in charge of the Object Inspector (Mattias) I'm going to be looking at the FormEditor closer so if I can figure out a good way to implement the dropping of controls I will do so and then the grabbers can be added.

If you brief me on how the grabbers work I can make sure they get implemented again...

Also, I am still looking for information on how we are going to implement the COMPONENT BAR. The way I do it is just temporary. I don't know the best way. Anyone want to take that over and re-do how they are created on the component bar and how the form get's the classname to create them?

Shane

>> 11/29/00 03:18PM >>>
Shane Miller wrote 8 lines
CVS Committed. New ObjectInspector code (thanks again Mattias) with events starting to show up and the new Color property editor. I am still having troubles with the NAME property. If I create a form and then drop a button on it, the NAME property is correct until I click on the FORM and back on the button. Then the NAME property is garbled. It's not the Object Inspector that's causing it. It's somewhere else. Any help would be appreciated..

I just saw it and I was impressed. The inspector looks good. Didn't look thoroughly, but what happened to the selection (and grabbers) ?

Marc

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

Reply by email

Marc Weustink
to Luis R. Hilario B.: ----- Original Message ----- From: Shane Miller To: Sent: Tuesday, November 28, 2000…

+ From: Luis R. Hilario B.

+ Yes, I see the Object Inspector, but within the form does not appear
+ nothing. It is really a general problem that has Lazarus
+ under Windows. Is GTK the problem?

You see more that I saw under Windows a while ago (it wouldn't start) Or someone has fixed it the last few weeks (I just got back from holliday)

+ Under Linux it does not compile for the reasons already
+ exposed. The error happens with the units GTK, Forms, etc.
+ http://www.freepascal.org/bugs/showrec.php3?ID=1164

I can't find the example you try to compile there.

Marc

Reply by email

Luis R. Hilario B.
to Marc Weustink

----- Original Message -----

Earlier message 26 lines
From: Marc Weustink To: Sent: Wednesday, November 29, 2000 5:52 AM Subject: RE: [lazarus] Object Inspector > + From: Luis R. Hilario B. > > + Yes, I see the Object Inspector, but within the form does not appear > + nothing. It is really a general problem that has Lazarus > + under Windows. Is GTK the problem? > > You see more that I saw under Windows a while ago (it wouldn't start) Or > someone has fixed it the last few weeks (I just got back from holliday) > > + Under Linux it does not compile for the reasons already > + exposed. The error happens with the units GTK, Forms, etc. > + http://www.freepascal.org/bugs/showrec.php3?ID=1164 > > I can't find the example you try to compile there. In the report of the error it is all the information including the directory and the name of the example program that comes with FPC. Luis Digital http://www.luisdigital.2y.net

Reply by email

Marc Weustink
to Shane Miller: CVS Committed. New ObjectInspector code (thanks again Mattias) with events starting to…
Shane Miller wrote 8 lines
CVS Committed. New ObjectInspector code (thanks again Mattias) with events starting to show up and the new Color property editor. I am still having troubles with the NAME property. If I create a form and then drop a button on it, the NAME property is correct until I click on the FORM and back on the button. Then the NAME property is garbled. It's not the Object Inspector that's causing it. It's somewhere else. Any help would be appreciated..

I just saw it and I was impressed. The inspector looks good. Didn't look thoroughly, but what happened to the selection (and grabbers) ?

Marc

Reply by email

Shane Miller

CVS Committed. New ObjectInspector code (thanks again Mattias) with events starting to show up and the new Color property editor.

I am still having troubles with the NAME property. If I create a form and then drop a button on it, the NAME property is correct until I click on the FORM and back on the button. Then the NAME property is garbled. It's not the Object Inspector that's causing it. It's somewhere else. Any help would be appreciated..

Thanks
Shane

Reply by email

Shane Miller

BTW, dropping controls on the form kills everything. I'm not sure exactly why yet but I'm working on it....

Shane

>> 11/27/00 12:59PM >>>

CVS has been updated with an early version of the object inspector (thanks to Mattias).

If you compile Lazarus you can run it and you'll see the Object Inspector. If you Click on File- New- Form a form appears and you can see the Object Inspector will show you the properties of the form. Not many of them can be changed yet through the OI but hopefully soon.....

Another step in the right direction.........

Shane

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

Reply by email

Shane Miller

CVS has been updated with an early version of the object inspector (thanks to Mattias).

If you compile Lazarus you can run it and you'll see the Object Inspector. If you Click on File- New- Form a form appears and you can see the Object Inspector will show you the properties of the form. Not many of them can be changed yet through the OI but hopefully soon.....

Another step in the right direction.........

Shane

Reply by email

Marc Weustink
to Shane Miller: I re-did the dropping of controls so I could get the object inspector working. The…
Shane Miller wrote 12 lines
I re-did the dropping of controls so I could get the object inspector working. The grabbers should be able to be added quickly again but I just didn't get to it. I'm not real sure how the dropping of controls should be implemented in the first place. Now that we have someone in charge of the Object Inspector (Mattias) I'm going to be looking at the FormEditor closer so if I can figure out a good way to implement the dropping of controls I will do so and then the grabbers can be added. If you brief me on how the grabbers work I can make sure they get implemented again...

There is one TControlSelection object. You can add/remove/etc controls with it.

     procedure Add(AControl: TControl);
         Adds a control to the selection. Grabbers are updated
     procedure Clear;
         Removes all controls from selection and hides grabbers
     function IsSelected(AControl: TControl): Boolean;
         Checks if AControl is member of the selection
     procedure Remove(AControl: TControl);
         Removes Aontrol from selection and updfates grabbers
     property Visible: Boolean read FVisible write SetVisible;
         Shows or hides the grabbers
     property OnChange: TNotifyEvent read FOnChange write FOnChange;
         Fires when the contents of theselection is changed (ie Controls

are added or removed)

Also, I am still looking for information on how we are going to implement the COMPONENT BAR. The way I do it is just temporary. I don't know the best way. Anyone want to take that over and re-do how they are created on the component bar and how the form get's the classname to create them?

I might have a look at it inthe near feature is there's noone else (I'm upgrading to win2000 right now)

Marc

Reply by email