I created a new descendant that overloads the base constructor
TJSONTOXML = class(TIpwJSON)
private
...
public
constructor Create(AOwner: TForm; ALogLevel: Integer); reintroduce; overload;
end;
but I forgot to change the previous create call
lIpwJSON := TIpwJSON.Create(Self);
to the new
lJSONToXML := TJSON2XML.Create(Self,lLevel);
Instead I just replaced the type so it was:
lJSONToXML := TJSON2XML.Create(Self);
It took me quite some time to figure this out ;-(
Is there a way to prevent this?
I could do a dirty Create(AOwner)
override with an Assert(False)
but prefer a cleaner way.
Note: parent constructors were
public
constructor Create(AOwner: TComponent); overload; override;
constructor Create(AOwner: TComponent; OEMKey: string); reintroduce; overload;