Sorry for all the trouble, I believe that I have found the problem I don’t really understand why it happened though. I had a method in immediate ancestor with same name but Containing a parameter
I thought that it would be obvious that they didn’t match but it seems to only go by name instead of name with parameter. Adding overload seemed to solve it but I’m still not sure why it got confused.
A = class (tbutton)
Constructor create (the owner:tcomponet); override;
Strict protected
Procedure test; virtual;
End;
B = class (a)
Constructor create (the owner:tcomponet); override;
Strict protected
Procedure test (const x:string); overload;
End;
C = class (b)
Constructor create (the owner:tcomponet); override;
Strict protected
Procedure test; override; // was being blocked by Procedure test (const x:string);
End
When I tried using virtual on procedure with same name instead of overload, it didn’t work. I guess this means that there can’t be different virtual procedures with the same name?