Hello,
i have a Problem solving this:
i have a SuperClass and Some SubClasses. The Subclasses have an Init Procedure.
I have A List of Superclasses in my main Unit where i wanne use something like this:
for i:=0 to myList.Count - 1 do begin
mylist.Items[i].Initialize;
end;
however the Initialization is different in all of my Subclasses so i thought defining a procedure like this:
procedure Initialize; virtual;
in my Superclass is pointless, because it will be an empty procedure. Can i Somehow predefine this Procedure in my Superclass to use it how i mentioned above ? I thought of creating an abstract procedure, but im not Sure if thats the right way.
Summarized Problem: the Procedure i wanna inherit from my Superclass, will be empty and i think thats a Pointless Procedure. Should i make an Abstract procedure for this or should i take another way to solve this ?
Can Someone please help me out, i'm overthinking here a lot i guess.
Thank you in advance