Hello,
on implementing my own TComponent class, I stuck into a problem...
I can not use properties like:
property Components[I: Integer]: TComponentin {$mode delphi}
So, my Question is: how is it possible to Count the Elements ?
type
TComponent = class(TPersistent)
private
FOwner: TComponent;
FTag: NativeInt;
protected
function GetComponent: TComponent;
function GetComponentCount: Integer;
function GetComponentIndex: Integer;
procedure SetComponentIndex(AValue: Integer);
public
constructor Create;
destructor Destroy; override;
published
property ComponentCount: Integer read GetComponentCount;
property ComponentIndex: Integer read GetComponentIndex write SetComponentIndex;
property Components[I: Integer]: TComponent read GetComponent; // in this Line
property Owner: TComponent read FOwner;
property Tag: NativeInt read FTag write FTag default 0;
end;