Link to home
Start Free TrialLog in
Avatar of tonitop
tonitop

asked on

Creating own class from Tlist

I have class:

type
  TMyList = class(TList)
  .
  .
  .
end;

Is there something I have to know/do before I can use my class? When I see components, there are always something like:
  .
  .
  public
    constructor Create(AOwner: TComponent); override;
  .
  .
constructor TSampleCalendar.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);

What are these inherited things? Do I have to use these things when i make my own class or is it just with components? How about if I have TList inside myclass:
type
  TTemp = class
   private
     mylist: TList;
end;

I usually just create the list when I add items into it. Like this

if mylist = nil then
  mylist := TList.Create;
mylist.add(item);
ASKER CERTIFIED SOLUTION
Avatar of rwilson032697
rwilson032697

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial