Hello,
I am converting a Delphi 6 project to Lazarus. I used the project conversion tool and got a project with still some issues. I managed to solve the first issues, but now I am stuck on this seemingly simple one:
o_MergeUsages unit contains the definition of o_MergeUsage class, to which I did no specify an ancestor (which means the ancestor is actually TObject). This class contains 2 variables and redefines Create as
o_MergeUsage = class
pCoordinates : AnsiString ;
pPicture : AnsiString ;
constructor Create (const coords, pict : string) ;
end { mergeusage } ;In the implementation, the first line of Create is "inherited Create ;":
constructor o_mergeusage.Create (const coords, pict : string) ;
begin { mergeusage.Create }
inherited Create ;
pCoordinates := coords ;
pPicture := TrimQuotes (pict)
end ; { mergeusage.Create }This works perfectly in Delphi 6. But Lazarus complains on the "inherited Create ;": "Error: Illegal expression".
Of course, I can't use simply
inherited ;because o_MergeUsage.Create has one parameter while it's ancestor (TObject) has none.
What am I doing wrong?