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(AOw ner: 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);
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(AOw
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.