Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/IDE/Visual Form Inheritance    [ Add a report in this area ]  
Report #:  5853   Status: Open
Add support to TActionManager on Visual Form Inheritance
Project:  Delphi Build #:  4.453
Version:    7.0 Submitted By:   Rodrigo Laurindo
Report Type:  Suggestion / Enhancement Request Date Reported:  9/4/2003 10:19:12 AM
Severity:    Commonly encountered problem Last Updated: 11/8/2010 4:50:55 PM
Platform:    All platforms Internal Tracking #:  
Resolution: Duplicate  Resolved in Build: : None
Duplicate of:  87623
Voting and Rating
Overall Rating: (6 Total Ratings)
4.00 out of 5
Total Votes: 1
Description
It would be great to add support to TActionManager on Visual Form Inheritance.
Steps to Reproduce:
Put a TActionManager on a form.
Try to inherit this form
Workarounds
None
Attachment
None
Comments

Robert Cerny at 9/5/2003 2:55:15 AM -
How would you do that?
I mean, how would you match collection items of ancestor and descendent?
Components are matched by name. Collection items have a display name, but it would be inconvenient to use it for this purpose, because it's not required to be unique within collection.
Besides, as you can't delete inherited component, you wouldn't be able to delete inherited collection item and this would be a huge compatibility problem with prior versions.

David Berneda at 9/5/2003 10:33:32 AM -
Collections already support Visual Form inheritance.

It's the special case of TActionManager base class (TCustomActionManager) that explicitely removes the attribute "csInheritable" from ComponentStyle.

  Exclude(FComponentStyle, csInheritable);

(See VCL ActnMan.pas unit , TCustomActionManager.Create constructor)

I guess there might be a technical limitation with actions that makes difficult to support form inheritance for them.

There are several places in the VCL that form inheritance is controlled for special cases.

For example, TCustomGrid class does a special trick when saving some properties.
See Grids.pas unit, at TCustomGrid.DefineProperties method.  

The inner DoColWidths method checks the "Filer.Ancestor" property,
which is not nil when the grid is "visually derived" from a base form.  It works like a charm.

regards
david

Kristofer Skaug at 9/10/2003 6:30:55 AM -
I haven't used the TActionManager before, it is disconcerting that whatever it does for you should prevent such a "fundamental OO right" as inheritance. Of course, you could always inherit a form non-visually and do the extensions in code, but VFI is just so much nicer.

At least one should think it should be possible to inherit an Actionmanager component but not be allowed to mess with it?

Kristofer

Rodrigo Laurindo at 10/1/2003 11:07:22 AM -
Description has been changed.

Server Response from: ETNACODE01