Let say I have two components: TThirdPartComponent TDataAwareThirdPartComponent. The second is inherited from the first.
Let say I have two components: TThirdPartComponent TDataAwareThirdPartComponent. The second is inherited from the first.
I create a new component from TThirdPartComponent, add functionalities and so far so good.
Now, I want these functionalities to be reflected in the descendents of TDataAwareThirdPartComponent too but.
Which is the best way to achieve that ?
I create a new component from TThirdPartComponent, add functionalities and so far so good.
Now, I want these functionalities to be reflected in the descendents of TDataAwareThirdPartComponent too but.
Which is the best way to achieve that ?
Depends on added functionality. Sometimes using class helper for base class is enough
ReplyDeleteWhat if the functionalities I implement in TThirdPartComponent involve changing existing methods (that's why I inherit the new component from TThirdPartComponent in first place) ? AFIK class helpers cannot help here
ReplyDeleteI think that's why FMX use LiveBindings, so you can bind non DBAware components to a DataSource.
ReplyDeletePerhaps with Generic
type
TMyCustomThrirdPartComponent = class()
end;
TMyThridPartComponent = TMyCustomThirdPartComponent;
TMyDBThridPartComponent = TMyCustomThirdPartComponent;
there will be 2 classes but only one code.