How to override TIniFile.Create constructor ?
This code is not working because Create is static:
TMyIniFile = class(TIniFile)
protected
public
constructor Create (CONST AppName: string); override; <------ Error 'Cannot override a non-virtual method'
end;
You cannot override the constructor of
TIniFilesince it is not virtual. The ini file classes do not use virtual constructors.You simply need to remove the
overridefrom your code.Implement it like this:
When you need to create one you do so like this: