Hi.
I am trying to port a Lissajous Curve Maker from Delphi to Lazarus.
I compiled to Delphi program source using the Delphi 11 Community Version just to make sure the initial source code works. It works well.
Now for the conversion hassles:
The program uses a set of components which I converted from Delphi dpk to Lazarus dav7.lpk
I had an initial black screen which I solved by doing in TForm1.FormCreate(Sender: TObject);
form1.paintbox1.Canvas.Brush.Color := clWhite;
form1.paintbox1.Canvas.draw(0,0,map); Now the errors that I get:
When trying to view the form I keep getting an error messageUnable to find the component class "TDavArrayBtn"
It is not registered via RegisterClass and no lfm was found
It is needed by unit1.pasI opened the unit1.lfm and it was there:
object DavArrayBtn1: TDavArrayBtn
Left = 832
Top = 440
Width = 22
Height = 160
Hint = 'color selection'
Border = 0
BtnHeight = 22
BtnSpacing = 1
BtnShape = bs3D
BtnWidth = 22
BtnEdge = 2
Columns = 1
onBtnChange = DavArrayBtn1BtnChange
onBtnPaint = DavArrayBtn1BtnPaint
Rows = 7
end
One thread on the forumn by Jamie suggests to delete this to get to the form. If I delete that I can get to the form but then errors come up saying DavArrayBtn1 is not there. If I don't delete it then I cannot get to the form at design time.
I even tried opening and registering the package but still no luck there (keep getting the error message).
Lastly no drawing of the Lissajous Curve shows up on the paintbox1.Attached is the converted to Lazarus code plus the converted Dav7 components with the dav7.lpk lazarus package. What I did was loaded the code and then added the package by open package file and then add to project. The code compiles OK but I get that error and also nothing drawn to paintbox1.
Kind of going round in circles here trying to work out why nothing is drawing to the paintbox.
Been looking at unit2.pas
It contains pencolor procedures. Does something here have to be added to convert from Delphi to Lazarus?